diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-07-19 15:36:12 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-07-19 15:36:12 +0000 |
commit | f78f75ed14f93361452dcf2827c552560f81237b (patch) | |
tree | 1e8781a0737f72d8bc3951a959160a7c41d37713 /numpy/core/src/arrayobject.c | |
parent | 5172ae3f46a2da8935e643c7ee6a2086fca3956c (diff) | |
download | numpy-f78f75ed14f93361452dcf2827c552560f81237b.tar.gz |
Don't release GIL for casting involving extended data-types.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r-- | numpy/core/src/arrayobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index e0dab85c2..0efbe42c9 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -7257,7 +7257,7 @@ _broadcast_cast(PyArrayObject *out, PyArrayObject *in, memset(buffers[1], 0, N*selsize); #if NPY_ALLOW_THREADS - if (!in->descr->hasobject && !out->descr->hasobject) { + if (!PyArray_ISEXTENDED(in) && !PyArray_ISEXTENDED(out)) { NPY_BEGIN_THREADS } #endif @@ -7274,7 +7274,7 @@ _broadcast_cast(PyArrayObject *out, PyArrayObject *in, PyArray_MultiIter_NEXT(multi); } #if NPY_ALLOW_THREADS - if (!in->descr->hasobject && !out->descr->hasobject) { + if (!PyArray_ISEXTENDED(in) && !PyArray_ISEXTENDED(out)) { NPY_END_THREADS } #endif @@ -7335,13 +7335,13 @@ PyArray_CastTo(PyArrayObject *out, PyArrayObject *mp) if (simple) { #if NPY_ALLOW_THREADS - if (!mp->descr->hasobject && !out->descr->hasobject) { + if (!PyArray_ISEXTENDED(mp) && !PyArray_ISEXTENDED(out)) { NPY_BEGIN_THREADS } #endif castfunc(mp->data, out->data, mpsize, mp, out); #if NPY_ALLOW_THREADS - if (!mp->descr->hasobject && !out->descr->hasobject) { + if (!PyArray_ISEXTENDED(mp) && !PyArray_ISEXTENDED(out)) { NPY_END_THREADS } #endif return 0; |