Skip to content
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

BUG: handle deprecation warnings from numpy 2.0.0dev0 (np.row_stack -> np.vstack and np.in1d -> np.isin) #4725

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

neutrinoceros
Copy link
Member

PR Summary

Fix remaining usage of deprecated API. See https://numpy.org/devdocs/release/2.0.0-notes.html#deprecations

@neutrinoceros neutrinoceros added this to the 4.3.1 milestone Nov 2, 2023
@@ -99,9 +99,9 @@ def __init__(
):
dd = ds.all_data()
newtags = dd[fds["particle_index"]].d.astype("int64")
mask = np.in1d(newtags, indices, assume_unique=True)
mask = np.isin(newtags, indices, assume_unique=True)
Copy link
Member

Choose a reason for hiding this comment

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

is the returned shape the same?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes. It matches the shape of the first argument in both cases.

@neutrinoceros neutrinoceros marked this pull request as ready for review November 2, 2023 14:38
Copy link
Member

@matthewturk matthewturk left a comment

Choose a reason for hiding this comment

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

why is this draft? looks good to go

@neutrinoceros
Copy link
Member Author

It is ! I removed the draft status as soon as I saw that tests passed everywhere :)

@matthewturk matthewturk merged commit c2f8d50 into yt-project:main Nov 2, 2023
13 checks passed
@neutrinoceros neutrinoceros deleted the numpy2.0_deprecations branch November 2, 2023 14:45
meeseeksmachine pushed a commit to meeseeksmachine/yt that referenced this pull request Nov 2, 2023
…mpy 2.0.0dev0 (np.row_stack -> np.vstack and np.in1d -> np.isin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants