Open
Description
retstep=True returns a tuple which doesn't work with the astype
pytensor/pytensor/tensor/extra_ops.py
Lines 1799 to 1808 in c822a8e
[ins] In [1]: import pytensor.tensor as pt
[ins] In [2]: pt.linspace(0, 1, retstep=True)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[2], line 1
----> 1 pt.linspace(0, 1, retstep=True)
File ~/GitHub/pymc-eco/pytensor/pytensor/tensor/extra_ops.py:1808, in linspace(start, stop, num, endpoint, retstep, dtype, axis, end, steps)
1797 start, stop = broadcast_arrays(start, stop)
1799 ls = _linspace_core(
1800 start=start,
1801 stop=stop,
(...)
1805 axis=axis,
1806 )
-> 1808 return ls.astype(dtype)
AttributeError: 'tuple' object has no attribute 'astype'