[Numpy-discussion] cross product of two 3xn arrays

Charles R Harris charlesr.harris at gmail.com
Thu Feb 16 22:21:15 CST 2006


Bill,

On 2/16/06, Bill Baxter <wbaxter at gmail.com> wrote:
> Quaternions using which convention?  [s,x,y,z] or [x,y,z,w]?
> The docstring should make it very clear.  Perhaps support a flag for
> choosing which, unless there's some python-wide standard for quaternions
> that I'm not aware of.
>
> --Bill
>
>
> On 2/17/06, Charles R Harris <charlesr.harris at gmail.com> wrote:
> > Would anyone be interested in a quaternion version of this for nx4
> > arrays with nx3 as a special case where the scalar part == 0? Looking
> > at the the cross product implementation, it shouldn't be to hard to
> > duplicate this for quaternions. What should such a product be called?
> > Something like qprod?
> >
> > Chuck
> >
> >

I like to put the scalar last, but I am open to putting it first if
anyone has strong feelings about it. As far as I know, there is no
scipy convention on this. Hmm, maybe a flag would be useful just
because folks are likely to have files sitting around full of
quaternions using both conventions. Maybe one more scalar type to add
to the NumPy mix? I must admit that dtype=Quaternion512 seems a bit
much. Anyway, I am open to suggestions.




More information about the Numpy-discussion mailing list