| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
… `__doc__` Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
There was a problem hiding this comment.
Apart from the nitpick on the tests, this looks great!
Sorry, something went wrong.
There was a problem hiding this comment.
FWIW, looks fine to me as well, but also some comments. I mostly still think that we should also note other things like module and qualname (which have very clear use-cases as well).
Sorry, something went wrong.
|
As a followup we should probably set __module__ on all of NumPy's built-in ufuncs so they show up where they're supposed to be in the public API instead of _multiarray_umath |
Sorry, something went wrong.
|
Maybe we can sneak in a deprecation warning into _add_newdoc_ufunc in this PR? It’s in np._core but we told people to continue using it because of the issue fixed by this PR. |
Sorry, something went wrong.
@ngoldbaum Done! I think all is ready now. |
Sorry, something went wrong.
| ``__qualname__``. | ||
|
|
||
| * ``_add_newdoc_ufunc`` is now deprecated. ``ufunc.__doc__ = newdoc`` should | ||
| be used instead. No newline at end of file |
There was a problem hiding this comment.
Nit, but it should be split into two files (different categories).
Sorry, something went wrong.
There was a problem hiding this comment.
Ah right, done!
Sorry, something went wrong.
|
We discussed this at the triage meeting and would like to see it merged in. |
Sorry, something went wrong.
|
I gave the C code another once-over and I think this is correct. I'll merge now. We should definitely update the way we set docstrings internally to make use of this as a followup, fixing #10167 too. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Hi @ngoldbaum, @mhvk,
This PR fixes #26233 and replaces #27383 (with existing review comments applied).