Skip to content

Commit ff32c7f

Browse files
committed
MAINT: unify error messages
1 parent b513156 commit ff32c7f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

numpy/core/src/common/ufunc_override.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ PyUFuncOverride_GetOutObjects(PyObject *kwds, PyObject **out_kwd_obj, PyObject *
9797
* The C-API recommends calling PySequence_Fast before any of the other
9898
* PySequence_Fast* functions. This is required for PyPy
9999
*/
100-
PyObject *seq = PySequence_Fast(*out_kwd_obj, "cannot convert");
100+
PyObject *seq = PySequence_Fast(*out_kwd_obj, "Could not convert object to sequence");
101101
int ret;
102102
if (seq == NULL) {
103103
return -1;

numpy/core/src/multiarray/methods.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ any_array_ufunc_overrides(PyObject *args, PyObject *kwds)
10111011
if (nin < 0) {
10121012
return -1;
10131013
}
1014-
fast = PySequence_Fast(args, "could not convert args for fast access");
1014+
fast = PySequence_Fast(args, "Could not convert object to sequence");
10151015
if (fast == NULL) {
10161016
return -1;
10171017
}

0 commit comments

Comments
 (0)