-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
API: Update lib.index_tricks
namespace
#24581
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
c12e904
to
eab45a4
Compare
That sounds like the right decision to me. |
The code changes look good to me and the changes to the
I think is good to merge as soon as the conflict is fixed. |
eab45a4
to
96395e3
Compare
Rebased and resolved conflicts! |
Looking on github search, it seems there are downstream usages of Sorry for missing that on my previous review. |
|
Ah, you mentioned type annotations - then sure, I can keep them. |
Yeah, |
I'm not sure about some of these. Using https://cs.github.com/, I find a single usage of I'm also not sure I understand the type annotations I'm seeing, they seem wrong for >>> np.s_[:, :-1]
(slice(None, None, None), slice(None, -1, None))
>>> type(np.s_[:, :-1])
<class 'tuple'> That's a regular tuple so annotating it as |
96395e3
to
ef961d9
Compare
ef961d9
to
86c63b3
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, thanks @mtsokol! Let's give this a go.
For completing the record: I rechecked those hits, and a large majority are outdated forks of the numpy repo or its docstring contents under |
Relevant issue #24507
Hi @rgommers @ngoldbaum,
This PR moves
lib.index_tricks
module to a private file and ensures that it's public methods are only available through the main namespace. Looking at overall usage ofc_
,s_
andr_
(which is a lot as I checked github search) I decided to keep them in the main namespace, therefore there's no need for localindex_tricks
namespace.