summaryrefslogtreecommitdiff
path: root/scipy/base/src/arrayobject.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-09-28 06:53:37 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-09-28 06:53:37 +0000
commitdcd3bd07a910e1bb727e048de0e7ff2443f7285f (patch)
tree989bfa0d98885a97b3c7ddd1a329a4554acce4e1 /scipy/base/src/arrayobject.c
parent2199334cfa7e3934bf81076510a84a73054ca868 (diff)
downloadnumpy-dcd3bd07a910e1bb727e048de0e7ff2443f7285f.tar.gz
Eliminated random_lite library
Diffstat (limited to 'scipy/base/src/arrayobject.c')
-rw-r--r--scipy/base/src/arrayobject.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/scipy/base/src/arrayobject.c b/scipy/base/src/arrayobject.c
index 12e2c9208..e1f3a5576 100644
--- a/scipy/base/src/arrayobject.c
+++ b/scipy/base/src/arrayobject.c
@@ -3849,11 +3849,12 @@ array_descr_get(PyArrayObject *self)
/* hand this off to the typeobject */
/* or give default */
-
- res = PyObject_GetAttrString((PyObject *)self->descr->typeobj,
- "__array_descr__");
- if (res) return res;
- PyErr_Clear();
+ if (PyArray_ISUSERDEF(self)) {
+ res = PyObject_GetAttrString((PyObject *)self->descr->typeobj,
+ "__array_descr__");
+ if (res) return res;
+ PyErr_Clear();
+ }
/* get default */
dobj = PyTuple_New(2);
if (dobj == NULL) return NULL;