From c18832ad479d878c947aadc553ef1401a9845c3a Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Tue, 11 Oct 2005 21:47:34 +0000 Subject: [PATCH] Fixed flags problem on array_interface conversion. --- scipy/base/src/arrayobject.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scipy/base/src/arrayobject.c b/scipy/base/src/arrayobject.c index ddbef40f8..89433fef0 100644 --- a/scipy/base/src/arrayobject.c +++ b/scipy/base/src/arrayobject.c @@ -5201,7 +5201,8 @@ array_frominterface(PyObject *input, PyArray_Typecode *intype, int flags) ret = (PyArrayObject *)PyArray_New(&PyArray_Type, n, dims, type.type_num, - NULL, data, type.itemsize, 0, NULL); + NULL, data, type.itemsize, + BEHAVED_FLAGS, NULL); if (ret == NULL) return NULL; Py_INCREF(input); ret->base = input; @@ -5234,7 +5235,7 @@ array_frominterface(PyObject *input, PyArray_Typecode *intype, int flags) if (swap) { PyObject *tmp; - tmp = PyObject_CallMethod((PyObject *)ret, "byteswap", ""); + tmp = PyArray_Byteswap(ret, TRUE); Py_DECREF(tmp); }