Skip to content

MNT: Update dtypes to reflect numpy namespace refactor#27082

Closed
mtsokol wants to merge 2 commits into
scikit-learn:mainfrom
mtsokol:update-numpy-namespace-refactor-part-3
Closed

MNT: Update dtypes to reflect numpy namespace refactor#27082
mtsokol wants to merge 2 commits into
scikit-learn:mainfrom
mtsokol:update-numpy-namespace-refactor-part-3

Conversation

@mtsokol

@mtsokol mtsokol commented Aug 17, 2023

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Aug 17, 2023

Copy link
Copy Markdown

✔️ 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

@rgommers rgommers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@rgommers rgommers left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

betatim commented Aug 29, 2023

Copy link
Copy Markdown
Member

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

lesteve commented Aug 29, 2023

Copy link
Copy Markdown
Member

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

lesteve commented Aug 29, 2023

Copy link
Copy Markdown
Member

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

@lesteve lesteve closed this Aug 29, 2023
@mtsokol

mtsokol commented Aug 29, 2023

Copy link
Copy Markdown
Contributor Author
* `("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