You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contrary to the docstring of np.diagonal, the returned array is non-writeable. The docstring says (predicts?) that for version 1.10 it is be writeable.
In [23]: np.version.full_version
Out[23]: '1.10.1'
In [24]: a = np.random.random(9).reshape((3,3))
In [25]: np.diagonal(a)[0] = 1
Traceback (most recent call last):
File "<ipython-input-25-8277268b3e32>", line 1, in <module>
np.diagonal(a)[0] = 1
ValueError: assignment destination is read-only
The text was updated successfully, but these errors were encountered:
Doh, yes, as you've guessed, that's just a forgotten message from the past
that should have gotten updated at some point but never did. It indeed is
not writeable in 1.10, and won't be writeable in 1.11 either given that
we're only a few days from branching and haven't talked about it at all.
I'll submit a patch to fix the message.
On Jan 14, 2016 10:30 AM, "Fons" notifications@github.com wrote:
Contrary to the docstring of npdiagonal, the returned array is
non-writeable The docstring says (predicts?) that for version 110 it is be
writeable
In [23]: npversionfull_version
Out[23]: '1101'
In [24]: a = nprandomrandom(9)reshape((3,3))
In [25]: npdiagonal(a)[0] = 1
Traceback (most recent call last):
File "", line 1, in
npdiagonal(a)[0] = 1
ValueError: assignment destination is read-only
—
Reply to this email directly or view it on GitHub #7010.
njsmith
added a commit
to njsmith/numpy
that referenced
this issue
Jan 15, 2016
Contrary to the docstring of
np.diagonal
, the returned array is non-writeable. The docstring says (predicts?) that for version 1.10 it is be writeable.The text was updated successfully, but these errors were encountered: