-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Document, deprecate or remove everything exposed in the "numpy" namespace #12385
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
Comments
|
@charris Yes, to be clear most of these have docstrings -- they just don't appear in the online documentation generated by Sphinx. |
Related: #10106 |
Hi, |
@jicksy let us know if you need help getting started: what you tried and where you get stuck. |
To make this ticket actionable it needs some decisions. Here is the easiest part, the functions that definitely need to be documented (i.e. review/improve docstring, and add to reference guide):
@jicksy I would suggest to start with those. |
Hi, I'd like to work on this! |
Some more proposed decisions: Deprecate in
Document and add to reference guide:
Deprecate completely (trivial alias with one keyword):
Deprecate because it was never meant to be public:
|
@smellslikekeenspirit please go for it! I suggest to comment here what part you are working on, because there seem to be multiple people interested. |
Hello! @rgommers I am starting with the first few functions that you mentioned. It is my very first time contributing to a complex project or even to documentation at this scale, so I am having a hard time locating the right document. |
This is different than #10106. Many of these already have docstrings, but they do not appear in the rendered documents. For instance, `compare_chararrays' has a docstring, but searching for it in the docs comes up empty. One choice would be to add it somewhere, perhaps in Miscellaneous routines, another would be to deprecate it. If you wish to pursue this, you should start with one of the items on the list and issue a PR with that fix. Then add a checklist to the PR with the other items you wish to handle so we can monitor progress. You may choose to leave the harder ones for another PR. |
I'd think |
Ok, understood. I'll keep both of you posted here |
@rgommers I did as you said. I have a couple more questions:
|
Yes, Sphinx translates
Indeed
This first PR will be quite straightforward so it's probably first time right. However if you're going to try more involved changes, you really should try to get |
@rgommers I am starting on removing the deprecated parts as suggested by @seberg as I see Chelwin has started on adding listing . As you wrote in one of the comments above, these four functions , |
xref #9312 which began documenting |
@kritisingh1 your doc changes so far look fine. Deprecating functionality is a bit more involved than editing docs, you need to:
This is a good example of deprecating a function: https://github.com/numpy/numpy/pull/12244/files |
@rgommers what are we planning to replace the functionalities which |
@kritisingh1 you can look at the implementation of those functions for the answer. They are both calling |
These functions look like internal helper functions, and in my opinion, do not need to be documented/ exposed to public. This issue is a couple PRs far from being closed so a general agreement would be a great help. |
agreed, no need to document them |
@kritisingh1 could you comment on whether we can close #13214, and add a checklist here of what if anything remains to be done? |
|
Yes we can close #13214
|
Good catch, thanks. I just remembered SciPy had its own, but we use the NumPy one as well. So yes, public it is .... It would be nice to improve the |
Done in gh-13946 |
Would it be possible to remove |
Are we sure that it's actually 20%? Remember the transitive import times might just move under a different module. It seems to me that we could hide those imports within Tester itself, without answering the question of when to remove it |
Yeah. I've been benchmarking import times. Nothing else imports unit test |
I can try to see if we can lazy import those two, but looking at the comment, it seems innocent enough to remove all together |
Removing @hmaarrfk there are existing issues on import time and lazy importing, please continue there rather than mix in the discussion here. |
Back in #12385 (comment), @rgommers (responding to a suggestion from @eric-wieser) said that @rgommers, sorry for the spam pings if that's a known problem with a fix in progress. I haven't followed all private/public decisions for 2.0 very closely. |
Thanks for the pings @WarrenWeckesser. It's being fixed up right now, and looks like it'll be staying in the |
I think we can close this issue. Most objects have been cleaned up now in the main namespace. Here is the status:
A few functions (e.g., Thanks everyone! |
Uh oh!
There was an error while loading. Please reload this page.
These functions in particular (from #12382) are exported by NumPy, but not documented in the online docs:
We'll need to make a decision about each of these functions, and either document or deprecate them. (For the most part, my preference would be for deprecation!)
To remove an item from the checks added in #12382, set its
__module__
attribute, e.g., using@set_module('numpy')
.The text was updated successfully, but these errors were encountered: