Skip to content

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

Merged
merged 4 commits into from
Aug 6, 2019

Conversation

kernc
Copy link
Contributor

@kernc kernc commented Aug 6, 2019

@kernc
Copy link
Contributor Author

kernc commented Aug 6, 2019

#27736, which touches these files, is scheduled for 1.0. I'd prefer to see this in 0.25.1. 😁

# 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
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

@WillAyd WillAyd left a 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

@WillAyd WillAyd added the Window rolling, ewma, expanding label Aug 6, 2019
@WillAyd WillAyd added this to the 0.25.1 milestone Aug 6, 2019
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm @mroeschke

@jreback jreback merged commit f669f94 into pandas-dev:master Aug 6, 2019
@jreback
Copy link
Contributor

jreback commented Aug 6, 2019

thanks @kernc

very nice putting up a bug report AND a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windowing fails on read-only arrays
4 participants