Skip to content

BUG: Errors thrown by 0d arrays in setitem are silenced and replaced - #9752

Merged
charris merged 1 commit into
numpy:masterfrom
eric-wieser:workaround-numeric-setitem
Sep 24, 2017
Merged

charris merged 1 commit into
numpy:masterfrom
eric-wieser:workaround-numeric-setitem

Conversation

@eric-wieser

Copy link
Copy Markdown
Member

Fixes gh-8461

Comment thread numpy/ma/tests/test_core.py Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

#9750 and #9751 are not new bugs from this patch - they're in 1.13 too

@eric-wieser
eric-wieser force-pushed the workaround-numeric-setitem branch from 98e6149 to df79005 Compare September 23, 2017 16:28

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good, modulo the nitpick on the name. What message does one get now? (in python3?)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of this, perhaps call it PySequence_NoString_Check? (Think it is fine not to mention the array scalar - that more obviously is not a sequence.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Name fixed

@eric-wieser

Copy link
Copy Markdown
Member Author

The error now is something about not being able to convert masked constant to int.

@eric-wieser
eric-wieser force-pushed the workaround-numeric-setitem branch from df79005 to f61f65a Compare September 23, 2017 20:08

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Forgot to change the name in its definition...

@eric-wieser
eric-wieser force-pushed the workaround-numeric-setitem branch from f61f65a to 8e26a5d Compare September 23, 2017 20:21
@charris
charris merged commit b79b09f into numpy:master Sep 24, 2017
@charris

charris commented Sep 24, 2017

Copy link
Copy Markdown
Member

LGTM, thanks Eric, Marten.

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.

3 participants