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

MAIN: fix to #7382, make scl in np.average writeable #7505

Merged
merged 1 commit into from
Apr 5, 2016

Conversation

ahaldane
Copy link
Member

@ahaldane ahaldane commented Apr 4, 2016

In #7382 we make np.average use broadcast_to when returning scl, but as pointed out in #5706, broadcast_to returns a read-only array, which might cause problems. This PR fixes that by adding a .copy(), and also avoiding the broadcast/copy if not needed.

@charris
Copy link
Member

charris commented Apr 5, 2016

Note that you could make the returned array writable by setting the flag, which might be an alternative to copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants