summaryrefslogtreecommitdiff
path: root/numpy/core/defchararray.py
diff options
context:
space:
mode:
authorStephan Hoyer <shoyer@google.com>2018-10-23 07:53:58 -0700
committerStephan Hoyer <shoyer@google.com>2018-10-23 07:57:40 -0700
commit8bab96faf2cb740536712e49e92e133626087018 (patch)
treeb16d0f4d121d588ca3219b95d3c4304059cddacd /numpy/core/defchararray.py
parent42a5bddc937ef02175d52a3ab3b3da6229e1ecb2 (diff)
downloadnumpy-8bab96faf2cb740536712e49e92e133626087018.tar.gz
MAINT: set preferred __module__ for numpy functions
Diffstat (limited to 'numpy/core/defchararray.py')
-rw-r--r--numpy/core/defchararray.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py
index 0a8c7bbec..e86086012 100644
--- a/numpy/core/defchararray.py
+++ b/numpy/core/defchararray.py
@@ -17,12 +17,13 @@ The preferred alias for `defchararray` is `numpy.char`.
"""
from __future__ import division, absolute_import, print_function
+import functools
import sys
from .numerictypes import string_, unicode_, integer, object_, bool_, character
from .numeric import ndarray, compare_chararrays
from .numeric import array as narray
from numpy.core.multiarray import _vec_string
-from numpy.core.overrides import array_function_dispatch
+from numpy.core import overrides
from numpy.compat import asbytes, long
import numpy
@@ -48,6 +49,10 @@ else:
_bytes = str
_len = len
+array_function_dispatch = functools.partial(
+ overrides.array_function_dispatch, module='numpy.char')
+
+
def _use_unicode(*args):
"""
Helper function for determining the output type of some string