diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-09-01 05:53:54 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-09-01 05:53:54 +0000 |
commit | 8a53914ded66488c093c48d20a29d475c1a3f79d (patch) | |
tree | 656756dde9742d00de926f03466890ed04f30990 /numpy/core/src/arrayobject.c | |
parent | f21c08b6b4eed501a54bcb4522877ce716726e75 (diff) | |
download | numpy-8a53914ded66488c093c48d20a29d475c1a3f79d.tar.gz |
Fix so that VOID arrays are not found during a search but instead object arrays.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r-- | numpy/core/src/arrayobject.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index d66e01647..3adc7d75a 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -6974,6 +6974,11 @@ _array_find_type(PyObject *op, PyArray_Descr *minitype, int max) outtype = _array_small_type(chktype, minitype); Py_DECREF(chktype); Py_DECREF(minitype); + /* VOID Arrays should not occur by "default" */ + if (outtype->type_num == PyArray_VOID) { + Py_DECREF(outtype); + return PyArray_DescrFromType(PyArray_OBJECT); + } return outtype; } |