diff options
author | Travis Oliphant <oliphant@enthought.com> | 2005-09-28 06:53:37 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2005-09-28 06:53:37 +0000 |
commit | dcd3bd07a910e1bb727e048de0e7ff2443f7285f (patch) | |
tree | 989bfa0d98885a97b3c7ddd1a329a4554acce4e1 /scipy/base/src | |
parent | 2199334cfa7e3934bf81076510a84a73054ca868 (diff) | |
download | numpy-dcd3bd07a910e1bb727e048de0e7ff2443f7285f.tar.gz |
Eliminated random_lite library
Diffstat (limited to 'scipy/base/src')
-rw-r--r-- | scipy/base/src/arrayobject.c | 11 | ||||
-rw-r--r-- | scipy/base/src/multiarraymodule.c | 2 |
2 files changed, 7 insertions, 6 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; diff --git a/scipy/base/src/multiarraymodule.c b/scipy/base/src/multiarraymodule.c index 0d4326b9f..4ad5d03f4 100644 --- a/scipy/base/src/multiarraymodule.c +++ b/scipy/base/src/multiarraymodule.c @@ -1117,7 +1117,7 @@ PyArray_Concatenate(PyObject *op, int axis) return NULL; } - if ((0 < axis) && (axis < MAX_DIMS)) + if ((axis < 0) || ((0 < axis) && (axis < MAX_DIMS))) return _swap_and_concat(op, axis, n); ret = NULL; |