-
-
Notifications
You must be signed in to change notification settings - Fork 12k
API: Update lib.shape_base namespace
#24566
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
f51caf1 to
eb29adc
Compare
|
Despite |
Agreed. It was never public to begin with, and I've never seen it used anywhere. |
eb29adc to
c84e087
Compare
numpy/lib/_shape_base_impl.py
Outdated
| DeprecationWarning, | ||
| stacklevel=2 | ||
| ) | ||
|
|
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.
IMO no need to deprecate it, just remove it. It has no internal consumers and as far as I can see no public consumers on github besides wrappers for the entire numpy API.
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.
I agree it's even better option for that one - removed.
c84e087 to
68ffec2
Compare
68ffec2 to
e03d8ff
Compare
|
The only change to the main namespace is It also looks like only items available in the main namespace were removed from So I think that all the API changes are correct. |
|
Thanks @mtsokol! |
Relevant issue #24507
Hi @rgommers @ngoldbaum,
This PR moves
lib.shape_basemodule to a private file and ensures that its public methods are only available through the main namespace. There are no additional functions available from a local namespace.Additionally this PR removes
np.get_array_wrapfrom the main namespace as it was already deprecated this month and it isn't used in SciPy, matplotlib, pandas etc. It also deprecatesnp.lib.shape_base.get_array_prepare(copy-paste ofget_array_wrapimplementation) that isn't even exposed in main namespace or used it other libraries.