diff options
author | Samesh <samesh.lakhotia@gmail.com> | 2019-07-17 19:31:22 +0530 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2019-07-31 10:42:18 -0700 |
commit | f483ad1f7fd3868fb2138afdb11f67063e149cf5 (patch) | |
tree | f88afba178c45e44c27e1023af50e43406ae5d00 /numpy/core/fromnumeric.py | |
parent | 3251dc2bdd322e7fe3cf80d8337f0d4624922321 (diff) | |
download | numpy-f483ad1f7fd3868fb2138afdb11f67063e149cf5.tar.gz |
DEP: Remove np.rank which has been deprecated for more than 5 years
references #7059
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 3389e7d66..75a6bae7f 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -25,7 +25,7 @@ __all__ = [ 'argmin', 'argpartition', 'argsort', 'around', 'choose', 'clip', 'compress', 'cumprod', 'cumproduct', 'cumsum', 'diagonal', 'mean', 'ndim', 'nonzero', 'partition', 'prod', 'product', 'ptp', 'put', - 'rank', 'ravel', 'repeat', 'reshape', 'resize', 'round_', + 'ravel', 'repeat', 'reshape', 'resize', 'round_', 'searchsorted', 'shape', 'size', 'sometrue', 'sort', 'squeeze', 'std', 'sum', 'swapaxes', 'take', 'trace', 'transpose', 'var', ] @@ -3573,30 +3573,3 @@ def alltrue(*args, **kwargs): numpy.all : Equivalent function; see for details. """ return all(*args, **kwargs) - - -@array_function_dispatch(_ndim_dispatcher) -def rank(a): - """ - Return the number of dimensions of an array. - - .. note:: - This function is deprecated in NumPy 1.9 to avoid confusion with - `numpy.linalg.matrix_rank`. The ``ndim`` attribute or function - should be used instead. - - See Also - -------- - ndim : equivalent non-deprecated function - - Notes - ----- - In the old Numeric package, `rank` was the term used for the number of - dimensions, but in NumPy `ndim` is used instead. - """ - # 2014-04-12, 1.9 - warnings.warn( - "`rank` is deprecated; use the `ndim` attribute or function instead. " - "To find the rank of a matrix see `numpy.linalg.matrix_rank`.", - VisibleDeprecationWarning, stacklevel=3) - return ndim(a) |