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

numpy-svn@scip... numpy-svn@scip...
Thu Apr 12 03:38:29 CDT 2007


Author: oliphant
Date: 2007-04-12 03:38:23 -0500 (Thu, 12 Apr 2007)
New Revision: 3708

Modified:
   trunk/numpy/core/src/scalartypes.inc.src
Log:
Fix scalar creation function so it can take sequences.

Modified: trunk/numpy/core/src/scalartypes.inc.src
===================================================================
--- trunk/numpy/core/src/scalartypes.inc.src	2007-04-12 08:37:38 UTC (rev 3707)
+++ trunk/numpy/core/src/scalartypes.inc.src	2007-04-12 08:38:23 UTC (rev 3708)
@@ -1761,6 +1761,7 @@
         }
 
         arr = PyArray_FromAny(obj, typecode, 0, 0, FORCECAST, NULL);
+        if ((arr==NULL) || (PyArray_NDIM(arr) > 0)) return arr;
         robj = PyArray_Return((PyArrayObject *)arr);
 
  finish:



More information about the Numpy-svn mailing list