Skip to content

Commit 5a58da4

Browse files
ferrinericardoV94
andauthored
Update pytensor/scalar/basic.py
Co-authored-by: Ricardo Vieira <[email protected]>
1 parent 5a7885a commit 5a58da4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytensor/scalar/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ def _cast_scalar(x, dtype):
11451145
if hasattr(x, "astype"):
11461146
return x.astype(dtype)
11471147
else:
1148-
return x
1148+
return getattr(np, dtype)(x)
11491149

11501150
def perform(self, node, inputs, output_storage):
11511151
if self.nout == 1:

0 commit comments

Comments
 (0)