diff options
author | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-04-29 15:24:01 -0400 |
---|---|---|
committer | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-04-29 17:37:50 -0400 |
commit | d7e0c7e34b293ab32a46960c65d063446115d4e8 (patch) | |
tree | 0bf7baacd9a19702ec3ea7820dae0d03f9550c21 /numpy/core/fromnumeric.py | |
parent | f3c3a969ff6c3f596d30137a90d87c745cc42497 (diff) | |
download | numpy-d7e0c7e34b293ab32a46960c65d063446115d4e8.tar.gz |
MAINT: move matrix tests in core, polynomial to matrixlib.
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 75bcedd81..58903d411 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -1336,10 +1336,10 @@ def diagonal(a, offset=0, axis1=0, axis2=1): Returns ------- array_of_diagonals : ndarray - If `a` is 2-D and not a `matrix`, a 1-D array of the same type as `a` - containing the diagonal is returned. If `a` is a `matrix`, a 1-D + If `a` is 2-D, a 1-D array of the same type as `a` containing the + diagonal is returned (except if `a` is a `matrix`, in which case a 1-D array containing the diagonal is returned in order to maintain - backward compatibility. + backward compatibility). If ``a.ndim > 2``, then the dimensions specified by `axis1` and `axis2` are removed, and a new axis inserted at the end corresponding to the diagonal. @@ -1496,10 +1496,9 @@ def ravel(a, order='C'): Returns ------- y : array_like - If `a` is a matrix, y is a 1-D ndarray, otherwise y is an array of - the same subtype as `a`. The shape of the returned array is - ``(a.size,)``. Matrices are special cased for backward - compatibility. + y is an array of the same subtype as `a`, with shape ``(a.size,)`` + (Note: matrices are special-cases for backward compatibility: if `a` + is a matrix, y is a 1-D ndarray.) See Also -------- |