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

Resolve deprecation warnings from numpy. #77

Closed
altix opened this issue May 17, 2022 · 1 comment · Fixed by #79
Closed

Resolve deprecation warnings from numpy. #77

altix opened this issue May 17, 2022 · 1 comment · Fixed by #79

Comments

@altix
Copy link
Collaborator

altix commented May 17, 2022

In stiltstation and geoinfo we use

  lon = np.float(clon[:-1])
  lat = np.float(clat[:-1])
  alt = np.int(loc_ident[-5:])

these calls leads to silent warnings:
DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
lon = np.float(clon[:-1])
DeprecationWarning: np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
alt = np.int(loc_ident[-5:])

@altix
Copy link
Collaborator Author

altix commented May 17, 2022

I suggest we change to

lon = float(...)
lat = float(...)
alt = int(...)

@altix altix linked a pull request May 20, 2022 that will close this issue
@ZogopZ ZogopZ mentioned this issue Jul 1, 2022
@ZogopZ ZogopZ changed the title DeprecationWarnings from numpy DeprecationWarnings from numpy. Sep 14, 2022
@ZogopZ ZogopZ changed the title DeprecationWarnings from numpy. Deprecation warnings from numpy. Sep 15, 2022
@ZogopZ ZogopZ changed the title Deprecation warnings from numpy. Resolve deprecation warnings from numpy. Sep 16, 2022
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 a pull request may close this issue.

1 participant