diff options
author | Arink Verma <arinkverma@gmail.com> | 2013-07-10 19:52:31 +0530 |
---|---|---|
committer | Arink Verma <arinkverma@gmail.com> | 2013-07-10 19:52:31 +0530 |
commit | 4c3ad43fc6cf68813bea09e1451f371f0a992369 (patch) | |
tree | 4b12009bb84989d3cf04c846323c541a4166678f /numpy | |
parent | 021d52a1294c662c7e31918db2e26bdc10e37f20 (diff) | |
download | numpy-4c3ad43fc6cf68813bea09e1451f371f0a992369.tar.gz |
ENH: added check for scalar array in PyArray_FromArray from ctors.c
Check if object is of array with newtype is NULL. If so return it directly instead of checking for casting.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/ctors.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c index fb8d078c4..15f815f87 100644 --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -1798,7 +1798,8 @@ PyArray_FromArray(PyArrayObject *arr, PyArray_Descr *newtype, int flags) oldtype = PyArray_DESCR(arr); if (newtype == NULL) { - /* Check if object is of array with Null newtype. + /* + * Check if object is of array with Null newtype. * If so return it directly instead of checking for casting. */ if (flags == 0) { |