diff options
-rw-r--r-- | numpy/core/include/numpy/arrayobject.h | 2 | ||||
-rw-r--r-- | numpy/core/numeric.py | 8 | ||||
-rw-r--r-- | numpy/lib/shape_base.py | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/numpy/core/include/numpy/arrayobject.h b/numpy/core/include/numpy/arrayobject.h index 797966a25..a301a8a1b 100644 --- a/numpy/core/include/numpy/arrayobject.h +++ b/numpy/core/include/numpy/arrayobject.h @@ -1303,7 +1303,7 @@ typedef struct { #define PyTypeNum_ISNUMBER(type) (type <= PyArray_CLONGDOUBLE) -#define PyTypeNum_ISSTRING(type) ((type == PyArray_UCHAR) || \ +#define PyTypeNum_ISSTRING(type) ((type == PyArray_STRING) || \ (type == PyArray_UNICODE)) #define PyTypeNum_ISCOMPLEX(type) ((type >= PyArray_CFLOAT) && \ diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 689e5c733..630f9ff66 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -108,17 +108,17 @@ can_cast = multiarray.can_cast lexsort = multiarray.lexsort -def asarray(a, dtype=None, fortran=None, ndmin=0): +def asarray(a, dtype=None, fortran=None): """returns a as an array. Unlike array(), no copy is performed if a is already an array. Subclasses are converted to base class ndarray. """ - return array(a, dtype, copy=False, fortran=fortran, ndmin=ndmin) + return array(a, dtype, copy=False, fortran=fortran) -def asanyarray(a, dtype=None, copy=False, fortran=None, ndmin=0): +def asanyarray(a, dtype=None, copy=False, fortran=None): """will pass subclasses through... """ - return array(a, dtype, copy=copy, fortran=fortran, subok=1, ndmin=ndmin) + return array(a, dtype, copy=copy, fortran=fortran, subok=1) def ascontiguous(a, dtype=None, copy=False): return array(a, dtype, copy=copy, fortran=False, ndmin=1) diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py index 28ea0b1d3..6ca25ac3c 100644 --- a/numpy/lib/shape_base.py +++ b/numpy/lib/shape_base.py @@ -121,7 +121,7 @@ def atleast_1d(*arys): """ res = [] for ary in arys: - res.append(asarray(ary,ndmin=1)) + res.append(array(ary,copy=False,ndmin=1)) if len(res) == 1: return res[0] else: @@ -141,7 +141,7 @@ def atleast_2d(*arys): """ res = [] for ary in arys: - res.append(asarray(ary,ndmin=2)) + res.append(array(ary,copy=False,ndmin=2)) if len(res) == 1: return res[0] else: |