Skip to content

Commit

Permalink
Fix swap error for indexing flat attribute. The data-type of the retu…
Browse files Browse the repository at this point in the history
…rned object keeps the byte-swap information so there is no need to swap.
  • Loading branch information
teoliphant committed Feb 13, 2008
1 parent 908adda commit e8c4f97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions THANKS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Jim Hugunin, Paul Dubois, Konrad Hinsen, David Ascher, and many others for
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.
Expand Down Expand Up @@ -34,5 +34,5 @@ Albert Strasheim for documentation, bug-fixes, regression tests and
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.
3 changes: 1 addition & 2 deletions numpy/core/src/arrayobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -9283,10 +9283,9 @@ iter_subscript(PyArrayIterObject *self, PyObject *ind)
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;
Expand Down

0 comments on commit e8c4f97

Please sign in to comment.