diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-10-18 04:44:28 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-10-18 04:44:28 +0000 |
commit | 4590e9bba04cae1c989c7d16da3dffdffb375561 (patch) | |
tree | 87d25ab4d7b5fab436111cfa7467c674445884f8 /numpy/core/src/arrayobject.c | |
parent | 0e70085a1e01b853739ab7c8160ae05f6560db03 (diff) | |
download | numpy-4590e9bba04cae1c989c7d16da3dffdffb375561.tar.gz |
Fix so that reshape copies fewer times. Fix so that arr.ctypes.data returns the integer and arr.ctypes._as_parameter_ returns the c_void_p type
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r-- | numpy/core/src/arrayobject.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index ededf70a0..30a791029 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -7819,7 +7819,8 @@ PyArray_FromArray(PyArrayObject *arr, PyArray_Descr *newtype, int flags) count and return the input */ else { Py_DECREF(newtype); - if ((flags & ENSUREARRAY) && !PyArray_CheckExact(arr)) { + if ((flags & ENSUREARRAY) && + !PyArray_CheckExact(arr)) { Py_INCREF(arr->descr); ret = (PyArrayObject *) \ PyArray_NewFromDescr(&PyArray_Type, @@ -7840,7 +7841,7 @@ PyArray_FromArray(PyArrayObject *arr, PyArray_Descr *newtype, int flags) } /* The desired output type is different than the input - array type */ + array type and copy was not specified */ else { if ((flags & UPDATEIFCOPY) && \ (!PyArray_ISWRITEABLE(arr))) { |