Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MAINT: Numpy 2.0 deprecations for row_stack and in1d#26566

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
oscargus merged 2 commits intomatplotlib:mainfromksunden:np_20_deps
Aug 31, 2023

Conversation

ksunden
Copy link
Member

PR summary

Remove usage of soon to be deprecated methods in numpy.

Part of#26422, xrefnumpy/numpy#24445

Keeping this in draft until the numpy PR is merged, in case they revert some of the changes.

PR checklist

@ksunden
Copy link
MemberAuthor

My only real qualm with this is now mixingvstack withcolumn_stack... The latter is kept because it has different semantics (particularly for 1-D arrays) thanhstack

That makes me wonder if arguing for keepingrow_stack is a good idea (itis just an alias, but it is a bit nicer to have consistent names in the same part of the code, sooo)

Alternatively, we could rework that code to usehstack (which may involve adding dimensions to some 1-d arrays, haven't looked too closely)

@mtsokol
Copy link
Contributor

Hi! Therow_stack is being removed as one of the NEP 52 goals is have each function in exactly one place (so aliases and multiple locations of the same function will be removed).
That's correct, to get the same semantics forcolumn_stack andhstack for 1d arrays it would require:

a=np.array([1,2,3])np.hstack([a[:,None],a[:,None]])# np.column_stack([a, b])

@ngoldbaum
Copy link
Contributor

numpy/numpy#24445 is looking ready to merge, does this still need work?

@ksundenksunden marked this pull request as ready for reviewAugust 30, 2023 16:03
@oscargusoscargus added this to thev3.8.0 milestoneAug 31, 2023
@oscargusoscargus merged commit6b0f313 intomatplotlib:mainAug 31, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestAug 31, 2023
ksunden added a commit that referenced this pull requestAug 31, 2023
…566-on-v3.8.xBackport PR#26566 on branch v3.8.x (MAINT: Numpy 2.0 deprecations for row_stack and in1d)
@ksundenksunden mentioned this pull requestSep 15, 2023
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.8.0
Development

Successfully merging this pull request may close these issues.

5 participants
@ksunden@mtsokol@ngoldbaum@QuLogic@oscargus

[8]ページ先頭

©2009-2025 Movatter.jp