diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2020-09-03 10:51:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-03 10:51:29 -0500 |
commit | 925f8381009bf63e54984fb4245466f0bef31ab0 (patch) | |
tree | 8163524ae5dacdf81d42131236034dea75fa1c3c /numpy/lib/index_tricks.py | |
parent | 077427b91fdd50249e594fd5c9826feb2e9df306 (diff) | |
parent | 92170a83e24b0a4468007ea4507e3a0ba0c30cd7 (diff) | |
download | numpy-925f8381009bf63e54984fb4245466f0bef31ab0.tar.gz |
Merge pull request #17233 from eric-wieser/deprecate-ndincr
DEP: Deprecated ndindex.ndincr
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r-- | numpy/lib/index_tricks.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py index 6093f7e9d..9d3de69dd 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -1,6 +1,7 @@ import functools import sys import math +import warnings import numpy.core.numeric as _nx from numpy.core.numeric import ( @@ -659,7 +660,15 @@ class ndindex: Increment the multi-dimensional index by one. This method is for backward compatibility only: do not use. + + .. deprecated:: 1.20.0 + This method has been advised against since numpy 1.8.0, but only + started emitting DeprecationWarning as of this version. """ + # NumPy 1.20.0, 2020-09-08 + warnings.warn( + "`ndindex.ndincr()` is deprecated, use `next(ndindex)` instead", + DeprecationWarning, stacklevel=2) next(self) def __next__(self): |