import pymc as pm
import aesara.tensor as at
s = at.scalar('s')
size = at.stack([s, s])
x = at.random.normal(size=size)
x.eval({s: 2})
# array([[-0.66285345, 0.97341598],
# [ 0.05158132, 2.03399059]])
pm.Normal.dist(size=size)
# ValueError: The `size` parameter must be a tuple, TensorVariable, int or list. Actual: <class 'aesara.tensor.var.TensorVariable'>
The error comes from this check here:
|
if isinstance(size, int) or (isinstance(size, TensorVariable) and size.ndim == 0): |
CC @michaelosthege