diff options
author | Stephan Hoyer <shoyer@google.com> | 2018-10-23 07:53:58 -0700 |
---|---|---|
committer | Stephan Hoyer <shoyer@google.com> | 2018-10-23 07:57:40 -0700 |
commit | 8bab96faf2cb740536712e49e92e133626087018 (patch) | |
tree | b16d0f4d121d588ca3219b95d3c4304059cddacd /numpy/lib/shape_base.py | |
parent | 42a5bddc937ef02175d52a3ab3b3da6229e1ecb2 (diff) | |
download | numpy-8bab96faf2cb740536712e49e92e133626087018.tar.gz |
MAINT: set preferred __module__ for numpy functions
Diffstat (limited to 'numpy/lib/shape_base.py')
-rw-r--r-- | numpy/lib/shape_base.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py index e8d43958a..00424d55d 100644 --- a/numpy/lib/shape_base.py +++ b/numpy/lib/shape_base.py @@ -1,5 +1,6 @@ from __future__ import division, absolute_import, print_function +import functools import warnings import numpy.core.numeric as _nx @@ -8,7 +9,7 @@ from numpy.core.numeric import ( ) from numpy.core.fromnumeric import product, reshape, transpose from numpy.core.multiarray import normalize_axis_index -from numpy.core.overrides import array_function_dispatch +from numpy.core import overrides from numpy.core import vstack, atleast_3d from numpy.lib.index_tricks import ndindex from numpy.matrixlib.defmatrix import matrix # this raises all the right alarm bells @@ -22,6 +23,10 @@ __all__ = [ ] +array_function_dispatch = functools.partial( + overrides.array_function_dispatch, module='numpy') + + def _make_along_axis_idx(arr_shape, indices, axis): # compute dimensions to iterate over if not _nx.issubdtype(indices.dtype, _nx.integer): |