We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7301a45 commit c28db53Copy full SHA for c28db53
pytensor/misc/safe_asarray.py
@@ -32,7 +32,7 @@ def _asarray(a, dtype, order=None):
32
if str(dtype) == "floatX":
33
dtype = config.floatX
34
dtype = np.dtype(dtype) # Convert into dtype object.
35
- rval = np.asarray(a, dtype=dtype, order=order)
+ rval = np.asarray(a, order=order).astype(dtype)
36
# Note that dtype comparison must be done by comparing their `num`
37
# attribute. One cannot assume that two identical data types are pointers
38
# towards the same object (e.g. under Windows this appears not to be the
0 commit comments