ENH: fixing generic error messages to be more specific in multiarray/descriptor.c#15484
ENH: fixing generic error messages to be more specific in multiarray/descriptor.c#15484mattip merged 24 commits intonumpy:masterfrom
Conversation
|
If there are no callers left, can you delete the definition of _report_generic_error? |
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
…into report_generic * 'report_generic' of https://github.com/ericmariasis/numpy: Update numpy/core/src/multiarray/descriptor.c Update numpy/core/src/multiarray/descriptor.c Update numpy/core/src/multiarray/descriptor.c
I was so close but unfortunately there was one location that I couldn't think of a good replacement for. It was basically if the data type could not be recognized in general. |
|
If it's one location, you could just inline the function |
Done. |
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
eric-wieser
left a comment
There was a problem hiding this comment.
Looks good. Probably doesn't need a test, but it would be great if you could post some example error output in a comment here.
Example error output:
-- The above is now updated to give better details of the error. |
seberg
left a comment
There was a problem hiding this comment.
@ericmariasis can you paste the error that happens with this patch applied? Thought ticks around '%R' may make sense. I am sure you can always massage the text, but its a nice improvement.
Some of the lines are a bit long, we often use:
PyErr_Format(PyExc_TypeError,
"8 spaces indentation before the message", )
style. It does not have to be that style, below 80 characters would be nice though (at least not much over).
Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
seberg
left a comment
There was a problem hiding this comment.
Thanks, I am good with putting it in now. If someone wants to massage the error messages also great, but most of them are rare, and they read fine to me.
Two more style nitpicks if you are still motivated.
|
Now that all reviewers have approved, is there anything on my part I can do to help this get merged into master? |
|
Thanks @ericmariasis |
Closes #15316