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

Eschew deprecated numpy aliases for builtins #61

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

musicinmybrain
Copy link
Contributor

Replaces “np.int” with “int”, and “np.float” with “float”, since these
aliases are deprecated in numpy 1.20.0. See
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
for details and justification.

Fixes #56.

Replaces “np.int” with “int”, and “np.float” with “float”, since these
aliases are deprecated in numpy 1.20.0. See
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
for details and justification.

Fixes firefly-cpp#56.
@musicinmybrain
Copy link
Contributor Author

The changes in this PR will not change program behavior at all.

However, numpy upstream suggests reviewing uses of np.int (particularly as an array dtype) to see if a fixed-width type is actually more appropriate:

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.

@lukapecnik lukapecnik merged commit e5ab79a into firefly-cpp:master Nov 29, 2021
@lukapecnik
Copy link
Collaborator

@all-contributors please add @musicinmybrain for code and infra

@allcontributors
Copy link
Contributor

@lukapecnik

I've put up a pull request to add @musicinmybrain! 🎉

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.

np.int is a deprecated alias
2 participants