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

TST: Prove that poly1d coeffs are immutable #8807

Merged
merged 1 commit into from
Mar 21, 2017

Conversation

eric-wieser
Copy link
Member

Remove the comment suggesting that they are not

Remove the comment suggesting that they are not
pass
assert_equal(p.coeffs, [1, 2, 3])

p.coeffs[2] += 10
Copy link
Member Author

Choose a reason for hiding this comment

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

The fact that this fails silently is possibly an argument for returning a readonly view instead.

However, that would cause surprise in cases like c = p.coeffs; c[2] += 10

@charris
Copy link
Member

charris commented Mar 21, 2017

LGTM, thanks Eric.

@charris charris merged commit 88ef1a6 into numpy:master Mar 21, 2017
Copy link
Member

@charris charris left a comment

Choose a reason for hiding this comment

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

LGTM.

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