-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: Errors thrown by 0d arrays in setitem are silenced and replaced #9752
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
a_u[()] = np.ma.masked | ||
assert_equal(a_u[()], u'--') | ||
|
||
@dec.knownfailureif(True, "See gh-9750") |
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.
98e6149
to
df79005
Compare
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.
This looks good, modulo the nitpick on the name. What message does one get now? (in python3?)
@@ -36,6 +36,16 @@ | |||
#include <limits.h> | |||
#include <assert.h> | |||
|
|||
/* check for sequences, but ignore the types numpy considers scalars */ | |||
static NPY_INLINE npy_bool | |||
MyPySequence_Check(PyObject *op) { |
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.
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.)
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.
Name fixed
The error now is something about not being able to convert masked constant to |
df79005
to
f61f65a
Compare
@@ -36,6 +36,16 @@ | |||
#include <limits.h> | |||
#include <assert.h> | |||
|
|||
/* check for sequences, but ignore the types numpy considers scalars */ | |||
static NPY_INLINE npy_bool | |||
PySequence_Check(PyObject *op) { |
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.
Forgot to change the name in its definition...
f61f65a
to
8e26a5d
Compare
LGTM, thanks Eric, Marten. |
Fixes gh-8461