From e254623dd13915bfb4a37395f1fc9fc20ee10b40 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Tue, 13 Dec 2022 13:39:55 -0700 Subject: MAINT: elaborate on error message for unaligned casting spec --- numpy/core/src/multiarray/array_method.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'numpy/core/src/multiarray') 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; } -- cgit v1.2.1