-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
ENH: Better error message for invalid axis #7916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
xref GH7915 Currently, writing array.max(axis=[0, 1]) doesn't mention you can use a tuple for the axis argument -- it just says "an integer is required".
8f80118
to
4e54717
Compare
@@ -289,7 +289,7 @@ PyArray_ConvertMultiAxis(PyObject *axis_in, int ndim, npy_bool *out_axis_flags) | |||
memset(out_axis_flags, 0, ndim); | |||
|
|||
axis = PyArray_PyIntAsInt_ErrMsg(axis_in, | |||
"an integer is required for the axis"); | |||
"an integer or tuple is required for the axis"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe tuple of integers
?
☔ The latest upstream changes (presumably #6054) made this pull request unmergeable. Please resolve the merge conflicts. |
@shoyer Want to keep working on this? |
I don't know what's going on here with the including the appropriate functions -- not sure when/if I'll have time to debug this. |
Mind if I close this then? You can reopen it if/when you have the time. |
Sure
|
OK, closing. Reopen when ready. |
xref #7915
Currently, writing array.max(axis=[0, 1]) doesn't mention you can use a tuple
for the axis argument -- it just says "an integer is required".