summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Goldbaum <nathan.goldbaum@gmail.com>2022-12-13 13:39:55 -0700
committerNathan Goldbaum <nathan.goldbaum@gmail.com>2022-12-13 13:39:55 -0700
commite254623dd13915bfb4a37395f1fc9fc20ee10b40 (patch)
tree3c20ec60f32145bd8d1c5216fafe161efd78d6ab
parent3139a881346ff7ad4326ecd296e6eeddf6c268a0 (diff)
downloadnumpy-e254623dd13915bfb4a37395f1fc9fc20ee10b40.tar.gz
MAINT: elaborate on error message for unaligned casting spec
-rw-r--r--numpy/core/src/multiarray/array_method.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/array_method.c b/numpy/core/src/multiarray/array_method.c
index 79c588f25..bdbd60dbb 100644
--- a/numpy/core/src/multiarray/array_method.c
+++ b/numpy/core/src/multiarray/array_method.c
@@ -353,8 +353,9 @@ fill_arraymethod_from_slots(
if ((meth->unaligned_strided_loop == NULL) !=
!(meth->flags & NPY_METH_SUPPORTS_UNALIGNED)) {
PyErr_Format(PyExc_TypeError,
- "Must provide unaligned strided inner loop when providing "
- "a contiguous version. (method: %s)", spec->name);
+ "Must provide unaligned strided inner loop when casting spec "
+ "has the NPY_METH_SUPPORTS_UNALIGNED flag. "
+ "(method: %s)", spec->name);
return -1;
}