summaryrefslogtreecommitdiff
path: root/numpy/add_newdocs.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-08-11 20:52:39 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-08-22 09:50:56 -0600
commitfd6cfd6828950850da27b09dab93a06dfe86308f (patch)
tree933b759ee252fc9224aa7d0704365b263a1db5f9 /numpy/add_newdocs.py
parent9464075c7260475bdd5d693b3046379a2bb62482 (diff)
downloadnumpy-fd6cfd6828950850da27b09dab93a06dfe86308f.tar.gz
ENH: Make the ndarray diagonal method return a view.
Also remove the test_diagonal_deprecation test and add test that checks that a view is returned and that it is not writeable. Closes #596.
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r--numpy/add_newdocs.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index c0dc56f30..4916a9611 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -3316,7 +3316,9 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('diagonal',
"""
a.diagonal(offset=0, axis1=0, axis2=1)
- Return specified diagonals.
+ Return specified diagonals. In NumPy 1.9 the returned array is a
+ read-only view instead of a copy as in previous NumPy versions. In
+ NumPy 1.10 the read-only restriction will be removed.
Refer to :func:`numpy.diagonal` for full documentation.