Skip to content

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

Merged
merged 1 commit into from
Jan 16, 2016

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Jan 15, 2016

closes #12049

@jreback jreback added Build Library building on various platforms Compat pandas objects compatability with Numpy or Python functions labels Jan 15, 2016
@jreback jreback added this to the 0.18.0 milestone Jan 15, 2016
@jreback
Copy link
Contributor Author

jreback commented Jan 15, 2016

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):
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right ok!

@shoyer
Copy link
Member

shoyer commented Jan 15, 2016

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.

@jreback
Copy link
Contributor Author

jreback commented Jan 15, 2016

ok should be good now.

if its changed to a DeprecationWarning I think we shouldn't show it, but will have to see

@@ -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'),
Copy link
Member

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 :)

Copy link
Contributor Author

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

@shoyer
Copy link
Member

shoyer commented Jan 15, 2016

LGTM

@jreback
Copy link
Contributor Author

jreback commented Jan 15, 2016

now if Travis-CI would just work :< notice its been red all day

jreback added a commit that referenced this pull request Jan 16, 2016
COMPAT: numpy compat with NaT != NaT, #12049
@jreback jreback merged commit ce37586 into pandas-dev:master Jan 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BLD: numpy master changes breaking
2 participants