Skip to content

Commit

Permalink
Simplify Blockwise perform method
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed Oct 25, 2024
1 parent 127daa1 commit 3393fd1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pytensor/tensor/blockwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,7 @@ def perform(self, node, inputs, output_storage):
res = (res,)

for node_out, out_storage, r in zip(node.outputs, output_storage, res):
out_dtype = getattr(node_out, "dtype", None)
if out_dtype and out_dtype != r.dtype:
r = np.asarray(r, dtype=out_dtype)
out_storage[0] = r
out_storage[0] = np.asarray(r, dtype=node.out.dtype)

def __str__(self):
if self.name is None:
Expand Down

0 comments on commit 3393fd1

Please sign in to comment.