Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

shoyer
Copy link
Member

@shoyer shoyer commented Aug 7, 2016

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".

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".
@shoyer shoyer force-pushed the better-axis-error branch from 8f80118 to 4e54717 Compare August 7, 2016 06:10
@@ -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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe tuple of integers?

@homu
Copy link
Contributor

homu commented Sep 24, 2016

☔ The latest upstream changes (presumably #6054) made this pull request unmergeable. Please resolve the merge conflicts.

@charris
Copy link
Member

charris commented Nov 6, 2016

@shoyer Want to keep working on this?

@shoyer
Copy link
Member Author

shoyer commented Nov 6, 2016

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.

@charris
Copy link
Member

charris commented Nov 6, 2016

Mind if I close this then? You can reopen it if/when you have the time.

@shoyer
Copy link
Member Author

shoyer commented Nov 6, 2016

Sure
On Sun, Nov 6, 2016 at 3:53 PM Charles Harris notifications@github.com
wrote:

Mind if I close this then? You can reopen it if/when you have the time.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#7916 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABKS1nyWMPZqmiuv-_eSy5W1KWArcFoDks5q7j5HgaJpZM4JeZcp
.

@charris charris added the 52 - Inactive Pending author response label Nov 6, 2016
@charris
Copy link
Member

charris commented Nov 6, 2016

OK, closing. Reopen when ready.

@charris charris closed this Nov 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants