chiark / gitweb /
Revert "helixish: use @ for matrix multiplication"
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 26 Nov 2017 22:11:23 +0000 (22:11 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 26 Nov 2017 22:11:23 +0000 (22:11 +0000)
Actually we want this to be useable with python-visual which in
stretch is python2 so we have to convert the matrices to type matrix.

This reverts commit 390d3621fcf18d8e1a98a8ff77a85dcaa61f4ed9.

helixish.py

index 1536ce6455e01f3bc62d63afb51a40bfe14c5f32..c5c30d785408b1bf2ab771d48d7a3a6b0035316e 100644 (file)
@@ -52,10 +52,9 @@ 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  = dPQplane_into @ augment(q)
-    q_plane  = unaugment(dPQplane_into @ augment(q))
+    dp_plane = unaugment(dPQplane_into * augment0(dp))
+    dq_plane = unaugment(dPQplane_into * augment0(dq))
+    q_plane  = unaugment(dPQplane_into * augment(q))
     dist_pq_plane = np.linalg.norm(q_plane)
 
     # two circular arcs of equal maximum possible radius