-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
MAINT: Python API cleanup nitpicks #24959
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
1d53b22
to
a95a54c
Compare
a95a54c
to
7112699
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.
Overall looks good, just one comment about np.lib.emath
.
from ._version import * | ||
from .introspect import * | ||
from numpy._core._multiarray_umath import add_docstring, tracemalloc_domain | ||
from numpy._core.function_base import add_newdoc | ||
|
||
__all__ = ['emath'] |
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.
Searching on github I don't find any usages of np.lib.emath
. Still, It's been here for a long time and we're still publicly exposing np.emath
, so it would be nice to generate a nicer AttributeError
with a migration in the __getattr__
for the module.
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.
Sure! I added a proper error message for np.lib.emath
.
7112699
to
9df0469
Compare
9df0469
to
4c0bc26
Compare
Thanks @mtsokol! |
This PR contains last cleanup changes for #23999.
Currently it consists of:
numpy.core
import sort,np.lib.arrayterator
private,np.lib.__all__
.