summaryrefslogtreecommitdiff
path: root/numpy/core/src/arrayobject.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2008-02-13 05:54:52 +0000
committerTravis Oliphant <oliphant@enthought.com>2008-02-13 05:54:52 +0000
commite8c4f9742339035c431f4047efd11030fd19f8ee (patch)
tree268b30620dd499a46cdede5803c4db6270a1e657 /numpy/core/src/arrayobject.c
parent908adda88a402d122fa3c8025c38305904a29fff (diff)
downloadnumpy-e8c4f9742339035c431f4047efd11030fd19f8ee.tar.gz
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.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r--numpy/core/src/arrayobject.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c
index 95b4ae92d..a7d0b67b4 100644
--- a/numpy/core/src/arrayobject.c
+++ b/numpy/core/src/arrayobject.c
@@ -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;