[Numpy-svn] r3390 - in trunk/numpy/core: . src

numpy-svn at scipy.org numpy-svn at scipy.org
Tue Oct 24 02:27:09 CDT 2006


Author: oliphant
Date: 2006-10-24 02:26:55 -0500 (Tue, 24 Oct 2006)
New Revision: 3390

Modified:
   trunk/numpy/core/numeric.py
   trunk/numpy/core/src/arraymethods.c
Log:
Fix some typos and allow use of F_CONTIGUOUS and C_CONTIGUOUS in requires.

Modified: trunk/numpy/core/numeric.py
===================================================================
--- trunk/numpy/core/numeric.py	2006-10-24 07:15:28 UTC (rev 3389)
+++ trunk/numpy/core/numeric.py	2006-10-24 07:26:55 UTC (rev 3390)
@@ -159,13 +159,17 @@
         subok = 0
     else:
         subok = 1
-
+        
     arr = array(a, dtype=dtype, copy=False, subok=subok)
 
     copychar = 'A'
-    if 'FORTRAN' in requirements or 'F' in requirements:
+    if 'FORTRAN' in requirements or \
+       'F_CONTIGUOUS' in requirements or \
+       'F' in requirements:
         copychar = 'F'
-    elif 'CONTIGUOUS' in requirements or 'C' in requirements:
+    elif 'CONTIGUOUS' in requirements or \
+         'C_CONTIGUOUS' in requirements or \
+         'C' in requirements:
         copychar = 'C'
 
     for prop in requirements:
@@ -175,7 +179,7 @@
     return arr   
 
 def isfortran(a):
-    """Returns True if 'a' is laid out in Fortran-order in memory (and a.ndim > 1)
+    """Returns True if 'a' is arranged in Fortran-order in memory with a.ndim > 1
     """
     return a.flags.fnc
 

Modified: trunk/numpy/core/src/arraymethods.c
===================================================================
--- trunk/numpy/core/src/arraymethods.c	2006-10-24 07:15:28 UTC (rev 3389)
+++ trunk/numpy/core/src/arraymethods.c	2006-10-24 07:26:55 UTC (rev 3390)
@@ -1689,7 +1689,7 @@
                 if (PyObject_IsTrue(uic)) {
 			self->flags = flagback;
                         PyErr_SetString(PyExc_ValueError,
-                                        "cannot set UPDATEIFCOPY"       \
+                                        "cannot set UPDATEIFCOPY "       \
                                         "flag to True");
                         return NULL;
                 }



More information about the Numpy-svn mailing list