Closed
Description
Describe the issue:
numpy.full works with shape as int and the pt.full docstring suggests that it works like numpy. However, this case does not work with current main branch of pytensor
Reproducable code example:
import pytensor.tensor as pt
import numpy as np
# Works
pt.full((5, 3), 3)
# Doesn't work
pt.full(5, 3) # TypeError see below
np.full(5, 3) # array([3, 3, 3, 3, 3])
# Work around
pt.full((5,), 3)
Error message:
Traceback (most recent call last):
pt.full(5, 3)
File "/home/.../pytensor/tensor/basic.py", line 1722, in full
return alloc(fill_value, *shape)
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Value after * must be an iterable, not int
PyTensor version information:
current main branch
Context for the issue:
Trying to switch out numpy with pytensor