diff options
| author | Sebastian Berg <sebastianb@nvidia.com> | 2022-12-14 10:49:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-14 10:49:57 +0100 |
| commit | a82cf6732fe9eef09e48dff2d986ca620bc18a1f (patch) | |
| tree | 46094ba3b7f4ff44e71e71c5ded9b33c25773b47 /numpy/core/src/multiarray | |
| parent | 1a21e72a2c5281bcb0d4d421c383ee77de0287d1 (diff) | |
| parent | e254623dd13915bfb4a37395f1fc9fc20ee10b40 (diff) | |
| download | numpy-a82cf6732fe9eef09e48dff2d986ca620bc18a1f.tar.gz | |
Merge pull request #22792 from ngoldbaum/fix-unaligned-error-message
MAINT: elaborate on error message for unaligned casting spec
Diffstat (limited to 'numpy/core/src/multiarray')
| -rw-r--r-- | numpy/core/src/multiarray/array_method.c | 5 |
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; } |
