-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
sym_diff failure on 3.4? #6444
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
Comments
yeh...Tom will have a look when he tries out 3.4 its has to do with |
Not sure how I missed that in the search. Should we close this as a dup? |
wasn't a 'direct' issue, just a comment...so this is fine |
I haven't been able to get a 3.4 virtualenv running yet. Does machine with 3.4 have a newer version of numpy as well? On Feb 22, 2014, at 11:46 AM, "jreback" <[email protected]mailto:[email protected]> wrote: cc @TomAugspurgerhttps://github.com/TomAugspurger yeh...Tom will have a look when he tries out 3.4 its has to do with nan ordering. weird — |
What's the "expected" (= desired, really) behaviour for sorting an array with nans? |
@TomAugspurger you can use numpy 1.8. |
hmm...if you sort with a stable (mergesort), it should leave the nans alone (and you can't tell if 2 nans switch place). though IIRC their was an issue on the sort ordering.... |
I had another look at this and I'm starting to think there's nothing wrong here. It's simply that in Python 3.3 we have
and in 3.4 we have
and we were never promised otherwise. If sorting preserves nan location (although annoyingly, the presence of nans breaks the sorting even of the non-nan elements in both lists and ndarrays), then since sets are unordered, we have no reason to expect our expected result. If we want to impose Series-style "push nans to the back" sorting, we can, but right now I think it's just that the test is too sensitive. |
Agreed. I think I'll rewrite the test to make sure the count of the nans is correct, and ignore the order. |
ok I suspect maybe 3.4 changed some sort of hashing scheme though this is some of security thing I think you can prob test this by seeing if the ordering of a dict keys is the same in 3.3 vs 3.4 |
http://bugs.python.org/issue19183 is prob the culprit |
I haven't been following the Hash Randomization Wars(tm), but if we're implicitly relying on a fixed set order, we've made a wrong step regardless of whether or not we actually observe a failure. |
the issue is that a float64index doesn't sort the same when it had Nan's , and the set operations sort the results
|
related is #6194 |
test_symmetric_diff
is failing after trying out pandas on a fresh 3.4 pull. It passes on 3.3 with the same numpy trunk version. It seems to have to do with the nan section:Version info (basically a fresh 3.4 build with only numpy dev installed):
The text was updated successfully, but these errors were encountered: