summaryrefslogtreecommitdiff
path: root/numpy/lib/index_tricks.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2020-09-03 12:12:50 +0100
committerEric Wieser <wieser.eric@gmail.com>2020-09-03 12:18:16 +0100
commit92170a83e24b0a4468007ea4507e3a0ba0c30cd7 (patch)
treed562aa458177b415aca98aab0571076753bef820 /numpy/lib/index_tricks.py
parent459991afcddfce6fbbae3fa83467fe607f2de7d0 (diff)
downloadnumpy-92170a83e24b0a4468007ea4507e3a0ba0c30cd7.tar.gz
DEP: Deprecated ndindex.ndincr
The "do not use" comment has been here since bb0e4f356cce2f199d9c08ffe572fbabadc846d1.
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r--numpy/lib/index_tricks.py9
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):