-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix windowing over read-only arrays #27767
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
#27736, which touches these files, is scheduled for 1.0. I'd prefer to see this in 0.25.1. 😁 |
pandas/core/window.py
Outdated
# Convert inf to nan for C funcs | ||
inf = np.isinf(values) | ||
if inf.any(): | ||
values = values.copy() # GH-27766, Don't write into user's data |
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.
comment on previous line.
is the issue that we dont want to overwrite user's data, or that the user might pass read-only array?
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.
Mmm, actually yeah, it's the first.
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.
minor nits on tests otherwise lgtm
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.
lgtm @mroeschke
thanks @kernc very nice putting up a bug report AND a PR! |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff