summaryrefslogtreecommitdiff
path: root/numpy/core/src/arraymethods.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-09-18 19:14:35 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-09-18 19:14:35 +0000
commiteff272cf3e4223a31917df07de4479abe83fe7dc (patch)
tree7fab58c3446d7ac6260da1af1f80aca395bf54df /numpy/core/src/arraymethods.c
parentab485b5413da403ae2d7d4c55982eb7dbe49344a (diff)
downloadnumpy-eff272cf3e4223a31917df07de4479abe83fe7dc.tar.gz
Fix so that astype and transpose return 0-d arrays if given 0-d arrays.
Diffstat (limited to 'numpy/core/src/arraymethods.c')
-rw-r--r--numpy/core/src/arraymethods.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/core/src/arraymethods.c b/numpy/core/src/arraymethods.c
index ac14d22d1..b70c65bf2 100644
--- a/numpy/core/src/arraymethods.c
+++ b/numpy/core/src/arraymethods.c
@@ -650,7 +650,6 @@ array_setscalar(PyArrayObject *self, PyObject *args) {
}
-
static PyObject *
array_cast(PyArrayObject *self, PyObject *args)
{
@@ -668,7 +667,7 @@ array_cast(PyArrayObject *self, PyObject *args)
if (descr->names != NULL) {
return PyArray_FromArray(self, descr, NPY_FORCECAST);
}
- return _ARET(PyArray_CastToType(self, descr, 0));
+ return PyArray_CastToType(self, descr, 0);
}
/* default sub-type implementation */
@@ -1351,7 +1350,7 @@ array_transpose(PyArrayObject *self, PyObject *args)
PyDimMem_FREE(permute.ptr);
}
- return _ARET(ret);
+ return ret;
}
#define _CHKTYPENUM(typ) ((typ) ? (typ)->type_num : PyArray_NOTYPE)