Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

np.quaternion constructor sometimes returns a tuple #7

Closed
moble opened this issue Dec 12, 2014 · 1 comment
Closed

np.quaternion constructor sometimes returns a tuple #7

moble opened this issue Dec 12, 2014 · 1 comment

Comments

@moble
Copy link
Owner

moble commented Dec 12, 2014

From @moble on October 21, 2014 19:29

This is not at all reproducible, but in some cases, if I do something like

import numpy as np, quaternion
q = np.quaternion(1,2,3,4)
print(type(q))

I get tuple. There doesn't seem to be any rhyme or reason. For example, I could run the tests just fine from my console (meaning that the constructor returned a quaternion object), but my ipython notebook would give me tuples at the same time. Or Travis could run on all 5 versions of python (2.6, 2.7, 3.2, 3.3, 3.4), but only get an error in one.

Copied from original issue: moble/numpy_quaternion#7

@moble
Copy link
Owner Author

moble commented Dec 12, 2014

I think this was closed in 01255e0. And I suspect the reason had something to do with the weird quaternion_new function. I've split it up into a _new which does as little as possible and an _init function which sets the values, as suggested in the python docs.

But since this isn't reproducible, I'm not sure if it's really solved, or if I'm just randomly not seeing it.

@moble moble closed this as completed Dec 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant