-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Make a.diagonal() writeable. #5407
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
Comments
Can I attempt to complete this task ? I am not completely accustomed to the core of numpy but it would be nice if I can try to go through the code for understanding a bit of core python too, since I think this is the line that needs to be removed for the view to be read/write ( as commented in code) I had found this by searching for |
Sure, have at it. Looks like you found the right spot. There should 8000 be a test somewhere that also needs to be updated. If not, you can add one :) |
@charris Thanks :) I will also check if there is corresponding test regarding the |
I think this is the test to check the writability of the view returned by the The change needs to be in the |
Yep, that is the place and the changes you suggest look right. Don't forget to rename the test function. |
Yeah, sure. When we change the name of the test function, do we need to update anywhere ? |
Should not matter, nose picks up the test functions by their prefix |
Oh thanks , just wanted to confirm. I referenced it in the PR #5409 . |
@charris, I wanted to try out the new changes proposed, it looks like the |
@maniteja123: Honestly, I'd stay clear of this one as a newcomer -- it's ~5% programming and 95% community debate wrangling. |
@njsmith I do understand the implications of this feature. I just wanted to clarify. Thanks :) |
Gently bumping the issue. I assume the issue has been indeed moved to 1.11 but the docstring needs some updating in that case. (I would also reorder the sections of the docstring so that "current behavior" rather than "past behavior" goes to the top.) |
Moving to 1.12, since we haven't talked about this and 1.11 is imminent. Docstrings have been fixed in master to state that this is a planned-at-some-indefinite-future-date rather than giving a specific version. |
Seems like it would be a nice feature some day. Especially since it was already documented as a feature. What's the "community debate wrangling" here? Should I even ask? ;) |
IIRC, there is a failing test. The transition was from returning a copy of the diagonal to returning a view, that's why the initial step was to make the view ro so folks would not accidentally change the original array. |
It's good to ask. There was a long debate on how bad the backwards compatibility break was: http://article.gmane.org/gmane.comp.python.numeric.general/59620. In hindsight we probably never should have made any changes. It's still a bit up in the air what we'll do now and when I think. |
The ndarray.diagonal method currently returns a view, but it is not writeable. It is documented to return a writeable view in 1.10.
The text was updated successfully, but these errors were encountered: