Re: [Numpy-discussion] Bug in np.cross for 2D vectors

Hi,
We came across this bug while using np.cross on 3D arrays of 2D vectors.
What version of numpy are you using? This should already be solved in numpy master, and be part of the 1.9 release. Here's the relevant commit, although the code has been cleaned up a bit in later ones:
https://github.com/numpy/numpy/commit/b9454f50f23516234c325490913224c3a69fb1...
Jaime
Yes, we are using 1.8 - sorry I should have checked! Thanks Neil

Hi,
We came across this bug while using np.cross on 3D arrays of 2D vectors.
What version of numpy are you using? This should already be solved in numpy master, and be part of the 1.9 release. Here's the relevant commit, although the code has been cleaned up a bit in later ones:
https://github.com/numpy/numpy/commit/b9454f50f23516234c325490913224c3a69fb1...
Jaime
Hi,
which numpy version are you using? Until recently, the cross product simply did *not* work in a broadcasting manner (3d arrays of 2d vectors), it did something, but usually not the right thing. This is fixed in recent versions (not sure if 1.8 or only now with 1.9)
- Sebastian
Hi, I thought I replied, but I don't see it on the list, so here goes again...
Yes, we are using 1.8, will confirm it's ok with 1.9
Thanks Neil
participants (1)
-
Neil Hodgson