Skip to content

Commit

Permalink
backwards compat for inplace matmul #178
Browse files Browse the repository at this point in the history
  • Loading branch information
jacanchaplais committed Jun 1, 2024
1 parent 0bbf0d3 commit 7976a69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion graphicle/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ def split_momentum(
parent = _momentum_to_numpy(momentum)
children = np.tile(parent, (2, 1))
children[0, :] *= z
children[0, :3] @= rotation_matrix(angle, axis).T
# backwards compatibility, switched inplace syntax for explicit ufunc
# children[0, :3] @= rotation_matrix(angle, axis).T
np.matmul(
children[0, :3], rotation_matrix(angle, axis).T, out=children[0, :3]
)
children[1, :] -= children[0, :]
return gcl.MomentumArray(children)

Expand Down

0 comments on commit 7976a69

Please sign in to comment.