-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: fix _most_ remaining xfails in tests/arithmetic #23308
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
Hello @jbrockmendel! Thanks for updating the PR.
Comment last updated on October 24, 2018 at 01:34 Hours UTC |
# In particular non-nanosecond timedelta64 needs to be cast to | ||
# nanoseconds, or else we get undesired behavior like | ||
# np.timedelta64(3, 'D') / 2 == np.timedelta64(1, 'D') | ||
return pd.Timedelta(obj) |
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.
FIXME: this will screw up on np.timedelta64(“nat”)
This should be put on hold until after #23320. |
Closing until after #23320. |
Most of the remaining xfails in tests/arithmetic are caused by single-column DataFrame operations not being equivalent to Series/Index operations. This PR fixes those tests by transposing both the DataFrame and the expected result in the appropriate cases.
We end up with 3 xfailed tests instead of 223. Runtime drops from 168.9 seconds to 99.4 seconds.
Some other ancillary fixes along the way: RangeIndex correctly returns NotImplemented when operating with a DataFrame. Series operations with Tick and non-nano timedelta64 are fixed.