summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-01-11 07:27:46 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-01-11 07:27:46 +0000
commitefa20eba4c84c282c1932cbd3a0f4154a3e7a026 (patch)
treefa2e5bd7b4bad41dc37927143469905bc419ad3a
parent2ea2a8751198880820adaebd55f4e0f1979aeaea (diff)
downloadnumpy-efa20eba4c84c282c1932cbd3a0f4154a3e7a026.tar.gz
Don't wrap ndarray's in object array wrappers.
-rw-r--r--numpy/core/src/arrayobject.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c
index 599d9060e..b7b375b66 100644
--- a/numpy/core/src/arrayobject.c
+++ b/numpy/core/src/arrayobject.c
@@ -809,6 +809,11 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base)
int swap;
type_num = descr->type_num;
+ if ((type_num == PyArray_OBJECT) && \
+ (PyArray_Check((*((PyObject **)data))))) {
+ Py_INCREF(*((PyObject **)data));
+ return *((PyObject **)data);
+ }
itemsize = descr->elsize;
type = descr->typeobj;
copyswap = descr->f->copyswap;