Skip to content
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

CLN/PERF: remove catching of numpy deprecation warning in comparison_op #40515

Conversation

jorisvandenbossche
Copy link
Member

@jorisvandenbossche jorisvandenbossche commented Mar 19, 2021

xref #39146

In some of the FrameWithFrameWide benchmarks, this takes up around 15% of the time.

While I don't think this should be needed (but let's see if warnings appear in the CI builds).

@jorisvandenbossche jorisvandenbossche added Performance Memory or execution speed performance Numeric Operations Arithmetic, Comparison, and Logical operations Clean labels Mar 19, 2021
@jorisvandenbossche
Copy link
Member Author

@jbrockmendel this warning filter was added in #32779. AFAIU, the reason the warning turned up in that PR is because you started to perform ops blockwise (using a 2D numpy datetime64[ns] array), instead going through Series op (where we use the EA).

arithmetic_op already calls ensure_wrapped_if_datetimelike on both left/right operands, so this makes comparison_op consistent with that (I know I would like to move out ensure_wrapped_if_datetimelike alltogether, but can be dealt with together with the other occurences later).

@jorisvandenbossche jorisvandenbossche added this to the 1.3 milestone Mar 19, 2021
Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

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

This looks like a good trade to me!

@jorisvandenbossche jorisvandenbossche merged commit b524462 into pandas-dev:master Mar 19, 2021
@jorisvandenbossche jorisvandenbossche deleted the ops-comparison-numpy-warning branch March 19, 2021 17:15
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Numeric Operations Arithmetic, Comparison, and Logical operations Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants