Repository navigation
DOC: updated docstrings in numpy/ma/core.py - #13241
ay11111111111 wants to merge 8 commits into
Conversation
|
The shape cannot be "any", it must be able to be broadcast to |
|
Sorry, issue #4363 requested deprecation instead. |
|
@mattip I am so sorry, I have commited the solution for another issue to this branch. How can I discard this commit? |
|
You can do something like |
|
@mattip I have updated docstrings, added several examples and deprecation warnings. |
You might want to investigate |
In the issue @eric-wieser commented "I think we should compromise on allowing filled(...) to take a broadcasting value, and writing tests for it (it's easy to get right), but deprecating using a non-scalar fill value for fill_value (because getting that right is hard)." Please be sure your code and tests answer to that spec or if you disagree discuss it here. Also, you should add a comment before the warning with the date and version (currently 1.17.0), and the relevant github issue. See the other DeprecationWarnings in the file. Since this changes user-facing behaviour, you also need to add a comment in |
|
@mattip thanks for navigating me. I'll do my best 👍 |
|
close/reopen. |
|
Hi @mattip ! To be honest, I am confused a little bit because the deprecation warnings in core.py are different in structure, and not all of them has a deprecation test. Can I ask 2 more questions?
Also, can I suggest reorder functions in alphabetical order in order to ease analysis for new-comer contributors? |
|
Duplicate of #13698 |
|
Wrong PR? |
|
Not sure why I considered this not a duplicate, sorry @mattip. |
This PR updates docstrings in numpy/ma/core.py for 'filled' and 'MaskedArray' functions. More specifically, it specifies that fill_value attribute can be of any shape.