API: Add lib.array_utils namespace#24540
Conversation
rgommers
left a comment
There was a problem hiding this comment.
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
rgommers
left a comment
There was a problem hiding this comment.
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_utilsmodule as as public namespace which creates only local namespace.Initially it hosts three functions:
byte_bounds(moved fromnp.lib.utils)normalize_axis_tuplenormalize_axis_index