-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Description
Description
The behavior changed regarding the shape of return_inverse. We patched our perform mode to behave like the old numpy, but we should change it now that we are only compatible with numpy 2.0
pytensor/pytensor/tensor/extra_ops.py
Lines 1229 to 1242 in bc0d670
| def perform(self, node, inputs, output_storage): | |
| [x] = inputs | |
| outs = old_np_unique( | |
| x, | |
| return_index=self.return_index, | |
| return_inverse=self.return_inverse, | |
| return_counts=self.return_counts, | |
| axis=self.axis, | |
| ) | |
| if isinstance(outs, tuple): | |
| for i in range(len(outs)): | |
| output_storage[i][0] = outs[i] | |
| else: | |
| output_storage[0][0] = outs |
Armavica