-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
COMPAT: numpy compat with NaT != NaT, #12049 #12058
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
Conversation
cc @shoyer so just a minor change actually. So ok from me to leave numpy as is I think. (though you still might want to deprecate / do next release in any event) |
return ((left == right) | (np.isnan(left) & np.isnan(right))).all() | ||
|
||
# numpy will will not allow this type of datetimelike vs integer comparison | ||
elif is_datetimelike_v_numeric(left, right): | ||
return False | ||
|
||
# M8/m8 | ||
elif needs_i8_conversion(left) or needs_i8_conversion(right): |
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.
we also need to check dtypes -- both timedelta or both datetime
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.
right ok!
I think that people will be unhappy if numpy issues a release that breaks the latest release of pandas.... so I think numpy needs to wait either way. |
34a69fa
to
34abc4a
Compare
ok should be good now. if its changed to a |
@@ -322,20 +324,40 @@ def test_array_equivalent(): | |||
np.array([np.nan, 1, np.nan])) | |||
assert array_equivalent(np.array([np.nan, None], dtype='object'), | |||
np.array([np.nan, None], dtype='object')) | |||
assert array_equivalent(np.array([np.nan, 1+1j], dtype='complex'), |
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.
glad to see some pep8 clean up :)
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.
I have gotten religion err flake8
LGTM |
now if Travis-CI would just work :< notice its been red all day |
34abc4a
to
358a334
Compare
COMPAT: numpy compat with NaT != NaT, #12049
closes #12049