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

np.int is deprecated in np.1.20 #137

Merged
merged 6 commits into from
Mar 15, 2023
Merged

np.int is deprecated in np.1.20 #137

merged 6 commits into from
Mar 15, 2023

Conversation

zhichen3
Copy link
Collaborator

@zhichen3 zhichen3 commented Mar 14, 2023

change np.int -> int

@@ -58,7 +58,7 @@ def process(file):
rmin = 0
rmax = np.sqrt(myg.xmax**2 + myg.ymax**2)

nbins = np.int(np.sqrt(myg.nx**2 + myg.ny**2))
nbins = np.int64(np.sqrt(myg.nx**2 + myg.ny**2))

Copy link
Collaborator

Choose a reason for hiding this comment

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

it looks like the suggested way to do this conversion is to use .astype(np.int64):
https://numpy.org/doc/stable/reference/generated/numpy.ndarray.astype.html

@yut23
Copy link
Collaborator

yut23 commented Mar 14, 2023

np.int is just an alias for the int builtin, so that should be used directly in the analysis scripts.

@zingale zingale merged commit ada4d3a into python-hydro:main Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants