diff options
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/getlimits.py | 2 | ||||
-rw-r--r-- | numpy/lib/type_check.py | 6 | ||||
-rw-r--r-- | numpy/lib/utils.py | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/numpy/lib/getlimits.py b/numpy/lib/getlimits.py index e2d68147f..921baebe2 100644 --- a/numpy/lib/getlimits.py +++ b/numpy/lib/getlimits.py @@ -27,7 +27,7 @@ class finfo(object): if obj is not None: return obj dtypes = [dtype] - newdtype = numeric.obj2arrtype(dtype) + newdtype = numeric.obj2sctype(dtype) if newdtype is not dtype: dtypes.append(newdtype) dtype = newdtype diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py index 9157ee0a9..e72a757e0 100644 --- a/numpy/lib/type_check.py +++ b/numpy/lib/type_check.py @@ -7,7 +7,7 @@ __all__ = ['iscomplexobj','isrealobj','imag','iscomplex', import numpy.core.numeric as _nx from numpy.core.numeric import ndarray, asarray, array, isinf, isnan, \ - isfinite, signbit, ufunc, ScalarType, obj2arrtype + isfinite, signbit, ufunc, ScalarType, obj2sctype from ufunclike import isneginf, isposinf import numpy.core.umath as umath @@ -44,7 +44,7 @@ def mintypecode(typechars,typeset='GDFgdf',default='d'): def asfarray(a, dtype=_nx.float_): """asfarray(a,dtype=None) returns a as a float array.""" - dtype = _nx.obj2arrtype(dtype) + dtype = _nx.obj2sctype(dtype) if not issubclass(dtype, _nx.inexact): dtype = _nx.float_ a = asarray(a,dtype=dtype) @@ -83,7 +83,7 @@ def nan_to_num(x): try: t = x.dtype.type except AttributeError: - t = obj2arrtype(type(x)) + t = obj2sctype(type(x)) if issubclass(t, _nx.complexfloating): y = nan_to_num(x.real) + 1j * nan_to_num(x.imag) elif issubclass(t, _nx.integer): diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index e9ff9e540..7e20c3c7a 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -1,6 +1,6 @@ -from numpy.core.numerictypes import obj2arrtype +from numpy.core.numerictypes import obj2sctype -__all__ = ['issubclass_', 'get_numpy_include', 'issubarrtype'] +__all__ = ['issubclass_', 'get_numpy_include', 'issubsctype'] def issubclass_(arg1, arg2): try: @@ -8,8 +8,8 @@ def issubclass_(arg1, arg2): except TypeError: return False -def issubarrtype(arg1, arg2): - return issubclass(obj2arrtype(arg1), obj2arrtype(arg2)) +def issubsctype(arg1, arg2): + return issubclass(obj2sctype(arg1), obj2sctype(arg2)) def get_numpy_include(): """Return the directory in the package that contains the numpy/*.h header |