-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
API: Add lib.array_utils
namespace
#24540
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
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.
Thanks @mtsokol. This looks pretty good to me. One idea to consider: would it make sense to move what is now in array_utils.py
to _array_utils_impl.py
and make the content of a new array_utils.py
only this:
from ._array_utils_impl import (
byte_bounds,
normalize_axis_index,
normalize_axis_tuple,
)
That would make it pretty much bullet-proof again more accidental leaking in of stray objects.
lib.array_utils
namespacelib.array_utils
namespace
Also, as we just discussed, these are the first time we expose |
1fe19c6
to
2a6cec2
Compare
@rgommers Sure, I added these two functions to |
Two questions:
|
It looks like
Sure! I sent a message to the mailing list. |
64bfe77
to
3cb96b6
Compare
Given this adds a new public name to the API let's let this sit for a few more days to gather comments. |
3cb96b6
to
5fe1e1c
Compare
5fe1e1c
to
4dd54b5
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.
LGTM now. Everyone's comments have been addressed, and the email to the mailing list didn't get replies. So I think we're good here. I suggest we merge this in a day or two unless there are new comments.
In it goes. Thanks @mtsokol. |
Adding here that the |
FWIW, the versionadded 1.13.0 are now deleted because it is uninterestingly ancient history anyway ;). |
Relevant issues #24507 and #24166
Hi @rgommers @ngoldbaum,
This PR adds
lib.array_utils
module as as public namespace which creates only local namespace.Initially it hosts three functions:
byte_bounds
(moved fromnp.lib.utils
)normalize_axis_tuple
normalize_axis_index