-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
COMPAT, TST: allow numpy array comparisons with complex dtypes #13392
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
COMPAT, TST: allow numpy array comparisons with complex dtypes #13392
Conversation
Didn't really think I needed a |
this needs perf testing, not sure how much that path is hit (so I don't think its an issue). but pls run them. |
return np.array_equal(left, right) | ||
except AttributeError: | ||
# see gh-13388 | ||
if not is_dtype_equal(left.dtype, right.dtype): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment here of what this is doing / catching
@jreback : Will quickly run benchmarks, but as this is just a compatibility issue (bug exists until |
Current coverage is 84.22%@@ master #13392 diff @@
==========================================
Files 138 138
Lines 50756 50763 +7
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 42756 42757 +1
- Misses 8000 8006 +6
Partials 0 0
|
Traces back to bug in NumPy v1.7.1 in which the 'array_equivalent' method could not compare NumPy arrays with complicated dtypes. As pandas relies on this function to check NumPy array equality during testing, this commit adds a fallback method for doing so. Closes pandas-devgh-13388. [ci skip]
230616e
to
fe87955
Compare
@jreback : Travis is passing on all machines again. Ready to merge if there are no other concerns. |
benchmarks ok? |
No obvious changes in the benchmarks AFAICT and as expected. |
ty |
Traces back to bug in NumPy
v1.7.1
in which thearray_equivalent
method could not compare NumPy arrays with complicated dtypes. Aspandas
relies on this function to check NumPy array equality during testing, this commit adds a fallback method for doing so.Closes #13388.