[Numpy-svn] r3176 - trunk/numpy/core/src

numpy-svn at scipy.org numpy-svn at scipy.org
Mon Sep 18 14:14:48 CDT 2006


Author: oliphant
Date: 2006-09-18 14:14:35 -0500 (Mon, 18 Sep 2006)
New Revision: 3176

Modified:
   trunk/numpy/core/src/arraymethods.c
Log:
Fix so that astype and transpose return 0-d arrays if given 0-d arrays.

Modified: trunk/numpy/core/src/arraymethods.c
===================================================================
--- trunk/numpy/core/src/arraymethods.c	2006-09-17 18:00:33 UTC (rev 3175)
+++ trunk/numpy/core/src/arraymethods.c	2006-09-18 19:14:35 UTC (rev 3176)
@@ -650,7 +650,6 @@
 }
 
 
-
 static PyObject *
 array_cast(PyArrayObject *self, PyObject *args)
 {
@@ -668,7 +667,7 @@
 	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 @@
 		PyDimMem_FREE(permute.ptr);
 	}
 
-	return _ARET(ret);
+	return ret;
 }
 
 #define _CHKTYPENUM(typ) ((typ) ? (typ)->type_num : PyArray_NOTYPE)



More information about the Numpy-svn mailing list