summaryrefslogtreecommitdiff
path: root/numpy/linalg
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/linalg')
-rw-r--r--numpy/linalg/lapack_litemodule.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/linalg/lapack_litemodule.c b/numpy/linalg/lapack_litemodule.c
index 53d9f01d5..869e55595 100644
--- a/numpy/linalg/lapack_litemodule.c
+++ b/numpy/linalg/lapack_litemodule.c
@@ -115,6 +115,12 @@ 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 != '|') {
+ PyErr_Format(LapackError,
+ "Parameter %s has non-native byte order in lapack_lite.%s",
+ obname, funname);
+ return 0;
} else {
return 1;
}