Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MNT: Update dtypes to reflect numpy namespace refactor #27082

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

mtsokol
Copy link
Contributor

@mtsokol mtsokol commented Aug 17, 2023

Hi! Here's a PR with follow-up work related to numpy/numpy#24376 changes. Basically, I update all items that are being removed in Part 3 of "main namespace refactor" PRs.

@mtsokol mtsokol changed the title ENH: Reflect changes from numpy namespace refactor part 3 ENH: Reflect changes from numpy namespace refactor Part 3 Aug 17, 2023
@github-actions
Copy link

github-actions bot commented Aug 17, 2023

✔️ Linting Passed

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

Generated for commit: 32ae3d0. Link to the linter CI: here

@Micky774 Micky774 changed the title ENH: Reflect changes from numpy namespace refactor Part 3 MNT: Update dtypes to reflect numpy namespace refactor Aug 17, 2023
@mtsokol mtsokol force-pushed the update-numpy-namespace-refactor-part-3 branch from fffe617 to 8f64bb1 Compare August 18, 2023 11:52
Copy link
Contributor

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @mtsokol

@rgommers
Copy link
Contributor

Argh, reviewed twice I see now - I thought this was new. Scikit-learn devs: I suggest to merge these cleanup PRs from @mtsokol rapidly; it helps avoid failures when we merge the corresponding cleanups in numpy's main branch.

@betatim
Copy link
Member

betatim commented Aug 29, 2023

I think this PR can be closed since #27190 got merged.

The only thing that could still be useful are the changes to sklearn/utils/tests/test_validation.py. What do you think @lesteve ?

@lesteve
Copy link
Member

lesteve commented Aug 29, 2023

Sorry I did not see this PR indeed before I opened #27190, which started as a single fix and ended up as "let's try to fix as many numpy dev and scipy dev issues while I am at it".

I think this can be closed. AFAICT the changes in sklearn/utils/tests/test_validation.py are reordering, for example:

  • ("uint16", "ushort", np.unsignedinteger) instead of ("ushort", "uint16", np.unsignedinteger). @mtsokol was there a good reason to change the ordering? I would expect the test to be symmetric but maybe I am missing something ...
  • ("longdouble", "longdouble", np.floating) instead of ("longfloat", "longdouble", np.floating). For this one I maintained a different dtype IIRC since I think this is the test aims to test different dtypes.

@lesteve
Copy link
Member

lesteve commented Aug 29, 2023

I am going to close this one, but feel free to reopen if I missed something!

@lesteve lesteve closed this Aug 29, 2023
@mtsokol
Copy link
Contributor Author

mtsokol commented Aug 29, 2023

* `("uint16", "ushort", np.unsignedinteger)` instead of `("ushort", "uint16", np.unsignedinteger)`. @mtsokol was there a good reason to change the ordering?

@lesteve It's just a detail, to match other entires (first canonical name str, then sized alias str). I think it can be closed.

@mtsokol mtsokol deleted the update-numpy-namespace-refactor-part-3 branch August 29, 2023 12:24
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