diff options
author | Travis Oliphant <oliphant@enthought.com> | 2008-03-22 03:06:28 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2008-03-22 03:06:28 +0000 |
commit | dd868d86c0080a2f73341fdd8da960c2af6318d9 (patch) | |
tree | d02706ef5b3f326557cfbdd800e200414a60f167 /numpy/core/src/arrayobject.c | |
parent | 3ee085282a5d5601ce310d56e3e4688a6872fc40 (diff) | |
download | numpy-dd868d86c0080a2f73341fdd8da960c2af6318d9.tar.gz |
Fix ticket #702 (as well as other speed ups).
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 3e11d3c3a..461422325 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -7773,7 +7773,7 @@ PyArray_CastTo(PyArrayObject *out, PyArrayObject *mp) NPY_BEGIN_THREADS_DEF - if (mpsize == 0) return 0; + if (mpsize == 0) return 0; if (!PyArray_ISWRITEABLE(out)) { PyErr_SetString(PyExc_ValueError, "output array is not writeable"); @@ -7800,7 +7800,8 @@ PyArray_CastTo(PyArrayObject *out, PyArrayObject *mp) if (PyArray_ISNUMBER(mp) && PyArray_ISNUMBER(out)) { NPY_END_THREADS } #endif - if (!PyArray_ISNUMBER(mp) && PyErr_Occurred()) return -1; + if (PyErr_Occurred()) return -1; + return 0; } /* If the input or output is OBJECT, STRING, UNICODE, or VOID */ |