diff options
author | Travis Oliphant <oliphant@enthought.com> | 2007-03-30 18:25:12 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2007-03-30 18:25:12 +0000 |
commit | 1b8049926366325a03edbb44cd2cb9fa44ceab7c (patch) | |
tree | ae9c95f11dd27717dfab8806fd049febff2638b0 /numpy/core/src | |
parent | 9c6f421934530cda2e33487bae3295519335597c (diff) | |
download | numpy-1b8049926366325a03edbb44cd2cb9fa44ceab7c.tar.gz |
Change 0-d record arrays so that field selection returns a 0-d array and not a scalar.
Diffstat (limited to 'numpy/core/src')
-rw-r--r-- | numpy/core/src/arraymethods.c | 2 | ||||
-rw-r--r-- | numpy/core/src/arrayobject.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/arraymethods.c b/numpy/core/src/arraymethods.c index fb0e102cd..e2dbaa717 100644 --- a/numpy/core/src/arraymethods.c +++ b/numpy/core/src/arraymethods.c @@ -264,7 +264,7 @@ array_getfield(PyArrayObject *self, PyObject *args, PyObject *kwds) PyArray_DescrConverter, &dtype, &offset)) return NULL; - return _ARET(PyArray_GetField(self, dtype, offset)); + return PyArray_GetField(self, dtype, offset); } diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index 9de78f996..5a5747b1f 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -3042,7 +3042,7 @@ array_subscript_nice(PyArrayObject *self, PyObject *op) if (mp->nd == 0) { Bool noellipses = TRUE; - if (op == Py_Ellipsis) + if ((op == Py_Ellipsis) || PyString_Check(op) || PyUnicode_Check(op)) noellipses = FALSE; else if (PyBool_Check(op) || PyArray_IsScalar(op, Bool) || (PyArray_Check(op) && (PyArray_DIMS(op)==0) && |