-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
Better treatment for complex numbers #1098
Conversation
Oops I have NOSE_DOCTEST_TESTS=t and NOSE_WITH_DOCTEST=t and that's why I had failing tests. There is no fail/error when I remove these envvars. |
It looks like sorting by dtype itself does not work. To see that, try this snippet: >>> from numpy import dtype >>> sorted([dtype('bool'), dtype('float64'), dtype('complex64'), ... dtype('float64'), dtype('object')]) [dtype('bool'), dtype('float64'), dtype('complex64'), dtype('float64'), dtype('object')]
The bug I fixed in bae8155 is very serious one and it could have effect even without complex number implementation I added. It is probably a bug in numpy. Try the following code and observe sorting fails. I checked with numpy 1.6.1. >>> from numpy import dtype
>>> sorted([dtype('bool'), dtype('float64'), dtype('complex64'),
... dtype('float64'), dtype('object')])
[dtype('bool'),
dtype('float64'),
dtype('complex64'),
dtype('float64'),
dtype('object')] |
BTW, I am using complex64 here but it should be complex128, right? |
Yes, should be complex128 |
Merged this in. Should make a sweep and change complex64 -> complex128 at some point, though |
As mentioned in pandas-dev#1098.
This fixes #1083. I checked that the number of failing tests (SKIP=38, errors=5, failures=34) do not increase with these change sets.
BTW, in form_blocks why not simply do
instead of calculating length?: