Skip to content

MAINT cleanup utils.__init__: move indexing tools into dedicated submodule #28546

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

Merged
merged 7 commits into from
Mar 13, 2024

Conversation

jeremiedbb
Copy link
Member

Extracted from #26686 to ease the reviews. The end goal is to clean the utils.__init__ module as explained in the linked PR.

I didn't find a relevant already existing module to move the functions related to indexing and assigning so I created a dedicated utils._indexing submodule.

resample and shuffle are public so I kept them importable from utils. These 2, I'm not sure it's the appropriate submodule for them but it's not bad either. Happy to take better suggestions.

_safe_indexing is also public although it has a leading underscore, but I kept as is.

The other ones are private so I made them only importable from utils._indexing.

Copy link

github-actions bot commented Feb 27, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 82eab00. Link to the linter CI: here

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the following, LGTM.

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@glemaitre glemaitre enabled auto-merge (squash) March 13, 2024 17:01
@glemaitre glemaitre merged commit 792a514 into scikit-learn:main Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants