From 390d3621fcf18d8e1a98a8ff77a85dcaa61f4ed9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 26 Nov 2017 22:09:00 +0000 Subject: [PATCH] helixish: use @ for matrix multiplication Older numpy wants you to use the matrix type. Newer Python and numpy can use @. Signed-off-by: Ian Jackson --- helixish.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/helixish.py b/helixish.py index c5c30d7..1536ce6 100644 --- a/helixish.py +++ b/helixish.py @@ -52,9 +52,10 @@ class HelixishCurve(): dPQplane_basis = np.vstack((dPQplane_basis, [0,0,0,1])) dPQplane_into = np.linalg.inv(dPQplane_basis) - dp_plane = unaugment(dPQplane_into * augment0(dp)) - dq_plane = unaugment(dPQplane_into * augment0(dq)) - q_plane = unaugment(dPQplane_into * augment(q)) + dp_plane = unaugment(dPQplane_into @ augment0(dp)) + dq_plane = unaugment(dPQplane_into @ augment0(dq)) + q_plane = dPQplane_into @ augment(q) + q_plane = unaugment(dPQplane_into @ augment(q)) dist_pq_plane = np.linalg.norm(q_plane) # two circular arcs of equal maximum possible radius -- 2.30.2