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

2014-07-17 Thread Neil Hodgson
> 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: >

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

2014-07-17 Thread Neil Hodgson
> 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: > h

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

2014-07-17 Thread Sebastian Berg
On Di, 2014-07-15 at 10:22 +0100, Neil Hodgson wrote: > Hi, > > We came across this bug while using np.cross on 3D arrays of 2D > vectors. 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 som

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

2014-07-16 Thread Jaime Fernández del Río
On Tue, Jul 15, 2014 at 2:22 AM, Neil Hodgson wrote: > 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 c

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

2014-07-15 Thread Neil Hodgson
Hi, We came across this bug while using np.cross on 3D arrays of 2D vectors. The first example shows the problem and we looked at the source for np.cross and believe we found the bug - an unnecessary swapaxes when returning the output (comment inserted in the code). Thanks Neil # Example sh