Skip to content

Commit 5909d93

Browse files
committed
Simplify Blockwise perform method
1 parent 70fb494 commit 5909d93

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: pytensor/tensor/blockwise.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,7 @@ def perform(self, node, inputs, output_storage):
361361
res = (res,)
362362

363363
for node_out, out_storage, r in zip(node.outputs, output_storage, res):
364-
out_dtype = getattr(node_out, "dtype", None)
365-
if out_dtype and out_dtype != r.dtype:
366-
r = np.asarray(r, dtype=out_dtype)
367-
out_storage[0] = r
364+
out_storage[0] = np.asarray(r, dtype=node.out.dtype)
368365

369366
def __str__(self):
370367
if self.name is None:

0 commit comments

Comments
 (0)