From 7976a698689a9f44be59e06b7024ae12d6569e4c Mon Sep 17 00:00:00 2001 From: Jacan Chaplais Date: Sat, 1 Jun 2024 10:47:49 +0100 Subject: [PATCH] backwards compat for inplace matmul #178 --- graphicle/transform.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graphicle/transform.py b/graphicle/transform.py index 1b72fbf..b812f31 100644 --- a/graphicle/transform.py +++ b/graphicle/transform.py @@ -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)