[Numpy-discussion] numpy_quaternion: OK on numpy 1.5.0, fails on 1.6.1
Charles R Harris
charlesr.harris at gmail.com
Mon May 7 16:41:16 EDT 2012
On Mon, May 7, 2012 at 2:33 PM, Tom Aldcroft
<aldcroft at head.cfa.harvard.edu>wrote:
> On Mon, May 7, 2012 at 3:30 PM, Charles R Harris
> <charlesr.harris at gmail.com> wrote:
> > On Mon, May 7, 2012 at 7:28 AM, Tom Aldcroft <
> aldcroft at head.cfa.harvard.edu>
> > wrote:
> >> Sorry to bother again, but I am running into an issue with the numpy
> >> quaternion dtype on numpy 1.6.1 :
> >> $ python
> >> ActivePython 184.108.40.206 (ActiveState Software Inc.) based on
> >> Python 2.7.1 (r271:86832, Feb 7 2011, 11:30:54)
> >> [GCC 4.0.2 20051125 (Red Hat 4.0.2-8)] on linux2
> >> Type "help", "copyright", "credits" or "license" for more information.
> >> >>> import numpy
> >> >>> import quaternion
> >> >>> q = numpy.quaternion(1,0,0,0)
> >> >>> q
> >> quaternion(1, 0, 0, 0)
> >> >>> q2 = numpy.quaternion(1,0,0,0)
> >> >>> q * q2
> >> Traceback (most recent call last):
> >> File "<stdin>", line 1, in <module>
> >> TypeError: ufunc 'multiply' not supported for the input types, and the
> >> inputs could not be safely coerced to any supported types according to
> >> the casting rule 'safe'
> >> >>> numpy.__version__
> >> '1.6.1'
> >> Using numpy 1.5.0 on the same platform the multiplication works and I
> >> get the expected result.
> >> For my near-term goal of getting tests in place I can just use 1.5.0,
> >> but if anyone has an idea of the problem I would appreciate help.
> > I haven't looked at this yet, but I set up the repository, added your
> > to the numpy core developers, and put in a pull request merging the
> > stuff.
> > If you would like, I can also merge in the quaternion type so you can
> > working with the repository. The build will need to be fixed up so it can
> > work with quaternions in a subdirectory.
> That would be good if you can merge in the quaternion type to get
> things rolling and set up in the right way.
OK. You should commit the first pull request just to get in the swing of
things. I've got the quaternions ready to go but would like to rebase on
top of the first commit.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion