diff --git a/pytools/__init__.py b/pytools/__init__.py index 0567920e03400cc3557c91040d13f882c48df037..e5efcb20982c77b1eaaaaa6339aa6a78950b75b9 100644 --- a/pytools/__init__.py +++ b/pytools/__init__.py @@ -86,7 +86,6 @@ Permutations, Tuples, Integer sequences --------------------------------------- .. autofunction:: wandering_element -.. autofunction:: indices_in_shape .. autofunction:: generate_nonnegative_integer_tuples_below .. autofunction:: generate_nonnegative_integer_tuples_summing_to_at_most .. autofunction:: generate_all_nonnegative_integer_tuples @@ -1170,6 +1169,10 @@ def wandering_element(length, wanderer=1, landscape=0): def indices_in_shape(shape): + from warnings import warn + warn("indices_in_shape is deprecated. You should prefer numpy.ndindex.", + DeprecationWarning, stacklevel=2) + if isinstance(shape, int): shape = (shape,)