diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-10-27 16:56:32 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-10-27 16:56:32 +0000 |
commit | 3c64ccdb050e56a0b112995d4d359c2017d4a4cd (patch) | |
tree | fc2d5e23e45da00979af647d1df309bfcceb899d /numpy/core/src/arrayobject.c | |
parent | 50c0847bc0f6dd4df616ac3c12d21dc423e8018c (diff) | |
download | numpy-3c64ccdb050e56a0b112995d4d359c2017d4a4cd.tar.gz |
Allow subtypes of all array scalars and fix-up scalar_value to accept sub-types.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r-- | numpy/core/src/arrayobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index cafba4e2c..65f929966 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -1432,6 +1432,7 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) } else { destptr = scalar_value(obj, descr); + if (destptr == NULL) {Py_DECREF(obj); return NULL;} } /* copyswap for OBJECT increments the reference count */ copyswap(destptr, data, swap, base); |