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

numpy-svn@scip... numpy-svn@scip...
Tue Feb 12 23:54:54 CST 2008

Author: oliphant
Date: 2008-02-12 23:54:52 -0600 (Tue, 12 Feb 2008)
New Revision: 4797

Fix swap error for indexing flat attribute.  The data-type of the returned object keeps the byte-swap information so there is no need to swap.

Modified: trunk/THANKS.txt
--- trunk/THANKS.txt	2008-02-13 02:56:50 UTC (rev 4796)
+++ trunk/THANKS.txt	2008-02-13 05:54:52 UTC (rev 4797)
@@ -3,7 +3,7 @@
     Numeric on which the code is based.
 Perry Greenfield, J Todd Miller, Rick White, Paul Barrett for Numarray
     which gave much inspiration and showed the way forward.
-Paul Dubois for Masked Arrays
+Paul Dubois for original Masked Arrays
 Pearu Peterson for f2py and numpy.distutils and help with code organization
 Robert Kern for mtrand, bug fixes, help with distutils, code organization, 
     and much more. 
@@ -34,5 +34,5 @@
     Valgrind expertise.
 Stefan van der Walt for documentation, bug-fixes and regression-tests.
 Andrew Straw for help with http://www.scipy.org, documentation, and testing. 
-David Cournapeau for documentation, bug-fixes, and code contributions including fast_clipping.
+David Cournapeau for scons build support, doc-and-bug fixes, and code contributions including fast_clipping.
 Pierre Gerard-Marchant for his rewrite of the masked array functionality.

Modified: trunk/numpy/core/src/arrayobject.c
--- trunk/numpy/core/src/arrayobject.c	2008-02-13 02:56:50 UTC (rev 4796)
+++ trunk/numpy/core/src/arrayobject.c	2008-02-13 05:54:52 UTC (rev 4797)
@@ -9283,10 +9283,9 @@
                                  0, (PyObject *)self->ao);
         if (r==NULL) goto fail;
         dptr = PyArray_DATA(r);
-        swap = !PyArray_ISNOTSWAPPED(self->ao);
         copyswap = PyArray_DESCR(r)->f->copyswap;
         while(n_steps--) {
-            copyswap(dptr, self->dataptr, swap, r);
+            copyswap(dptr, self->dataptr, 0, r);
             start += step_size;
             PyArray_ITER_GOTO1D(self, start)
                 dptr += size;

More information about the Numpy-svn mailing list