8000 DOC: Remove references to diagonal changes in 1.8. by charris · Pull Request #3608 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DOC: Remove references to diagonal changes in 1.8. #3608

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 1 commit into from
Aug 15, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
DOC: Remove references to diagonal changes in 1.8.
Not happening. Also remove reference to selecting multiple fields out of
an array returning a view from 1.8.0 release notes.

Closes #3228.
  • Loading branch information
charris committed Aug 12, 2013
commit df1aa99739ce194713c11a3685b9e99ac1ee1f94
5 changes: 0 additions & 5 deletions doc/release/1.8.0-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ Support for SCons has been removed.
Compatibility notes
===================

numpy.diag, np.diagonal, and the diagonal method of ndarrays return a view
onto the original array, instead of producing a copy.

selecting multiple fields out of an array also produces a view.

The hash function of numpy.void scalars has been changed. Previously the
pointer to the data was hashed as an integer. Now, the hash function uses
the tuple-hash algorithm to combine the hash functions of the elements of
Expand Down
4 changes: 2 additions & 2 deletions numpy/core/fromnumeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,10 +1130,10 @@ def diagonal(a, offset=0, axis1=0, axis2=1):
on this fact is deprecated. Writing to the resulting array continues to
work as it used to, but a FutureWarning will be issued.

In NumPy 1.8, it will switch to returning a read-only view on the original
In NumPy 1.9, it will switch to returning a read-only view on the original
array. Attempting to write to the resulting array will produce an error.

In NumPy 1.9, it will still return a view, but this view will no longer be
In NumPy 1.10, it will still return a view, but this view will no longer be
marked read-only. Writing to the returned array will alter your original
array as well.

Expand Down
2 changes: 1 addition & 1 deletion numpy/core/src/multiarray/arrayobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ array_might_be_written(PyArrayObject *obj)
const char *msg =
"Numpy has detected that you (may be) writing to an array returned\n"
"by numpy.diagonal or by selecting multiple fields in a record\n"
"array. This code will likely break in the next numpy release --\n"
"array. This code will likely break in a future numpy release --\n"
"see numpy.diagonal or arrays.indexing reference docs for details.\n"
"The quick fix is to make an explicit copy (e.g., do\n"
"arr.diagonal().copy() or arr[['f0','f1']].copy()).";
Expand Down
0