summaryrefslogtreecommitdiff
path: root/numpy/linalg/lapack_litemodule.c
diff options
context:
space:
mode:
authorMatthew Brett <matthew.brett@gmail.com>2012-03-17 01:32:40 -0700
committerCharles Harris <charlesr.harris@gmail.com>2012-03-17 17:01:54 -0600
commit016ad9fb4d818feae2974ffae7c4ff0bbc99e3b0 (patch)
tree8fe01f3fb14c6ef27766d551561419fa56dadb1a /numpy/linalg/lapack_litemodule.c
parent83480b6eb106d8c7e1d9293d7adc988c7c670778 (diff)
downloadnumpy-016ad9fb4d818feae2974ffae7c4ff0bbc99e3b0.tar.gz
BUG: native but not '=' byte order error in lapack
The check_object call in lapack_litemodule was checking if the passed array was of byteorder '=' or '|', but this check failed for arrays of specified native byte order ('<' on little-endian).
Diffstat (limited to 'numpy/linalg/lapack_litemodule.c')
-rw-r--r--numpy/linalg/lapack_litemodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/linalg/lapack_litemodule.c b/numpy/linalg/lapack_litemodule.c
index f302deb9d..25a0181ea 100644
--- a/numpy/linalg/lapack_litemodule.c
+++ b/numpy/linalg/lapack_litemodule.c
@@ -115,8 +115,7 @@ check_object(PyObject *ob, int t, char *obname,
"Parameter %s is not of type %s in lapack_lite.%s",
obname, tname, funname);
return 0;
- } else if (((PyArrayObject *)ob)->descr->byteorder != '=' &&
- ((PyArrayObject *)ob)->descr->byteorder != '|') {
+ } else if (PyArray_ISBYTESWAPPED(ob)) {
PyErr_Format(LapackError,
"Parameter %s has non-native byte order in lapack_lite.%s",
obname, funname);