Closed
Description
Description
Just create one on-demand np.random.default_rng()
. No need to require it explicitly?
import pytensor.tensor as pt
from pytensor.gradient import verify_grad
verify_grad(pt.log, [2.0])
# TypeError: rng should be a valid instance of numpy.random.RandomState. You may want to use tests.unittest_tools.verify_grad instead of pytensor.gradient.verify_grad.
The message is also outdated, as numpy.random.Generator
are accepted (and preferred)