From: Ian Jackson Date: Sun, 26 Nov 2017 22:09:00 +0000 (+0000) Subject: helixish: use @ for matrix multiplication X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=390d3621fcf18d8e1a98a8ff77a85dcaa61f4ed9;p=moebius3.git 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 --- 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