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

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Sep 7 13:12:57 CDT 2006


Author: oliphant
Date: 2006-09-07 13:12:53 -0500 (Thu, 07 Sep 2006)
New Revision: 3131

Modified:
   trunk/numpy/core/src/arraymethods.c
Log:
Fix invalid keyword argument error in reshape method.

Modified: trunk/numpy/core/src/arraymethods.c
===================================================================
--- trunk/numpy/core/src/arraymethods.c	2006-09-07 17:13:42 UTC (rev 3130)
+++ trunk/numpy/core/src/arraymethods.c	2006-09-07 18:12:53 UTC (rev 3131)
@@ -74,8 +74,12 @@
 	if (kwds != NULL) {
 		PyObject *ref;
 		ref = PyDict_GetItemString(kwds, "order");
-		if (ref == NULL ||                                      \
-		    (PyArray_OrderConverter(ref, &order) == PY_FAIL))
+                if (ref == NULL) {
+                        PyErr_SetString(PyExc_TypeError, 
+                                        "invalid keyword argument");
+                        return NULL;
+                }
+		if ((PyArray_OrderConverter(ref, &order) == PY_FAIL))
 			return NULL;
 	}
 



More information about the Numpy-svn mailing list