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

numpy-svn@scip... numpy-svn@scip...
Tue Feb 26 18:51:53 CST 2008


Author: oliphant
Date: 2008-02-26 18:51:51 -0600 (Tue, 26 Feb 2008)
New Revision: 4824

Modified:
   trunk/numpy/core/src/arrayobject.c
Log:
Don't use FAST moves on aligned flexible data-types to avoid bus errors on SPARC archiecture.

Modified: trunk/numpy/core/src/arrayobject.c
===================================================================
--- trunk/numpy/core/src/arrayobject.c	2008-02-26 21:17:13 UTC (rev 4823)
+++ trunk/numpy/core/src/arrayobject.c	2008-02-27 00:51:51 UTC (rev 4824)
@@ -758,7 +758,12 @@
         sptr = aligned;
     }
     else sptr = src->data;
-    if (PyArray_ISALIGNED(dest)) {
+    /* FIXME: This should check for a flag on the data-type
+       that states whether or not it is variable length.
+       Because the ISFLEXIBLE check is hard-coded to the 
+       built-in data-types.
+     */ 
+    if (PyArray_ISALIGNED(dest) && !PyArray_ISFLEXIBLE(dest)) {
         myfunc = _strided_byte_copy;
     }
     else if (usecopy) {



More information about the Numpy-svn mailing list