Skip to content

Eschew deprecated numpy aliases for builtins#61

Merged
lukapecnik merged 1 commit intofirefly-cpp:masterfrom
musicinmybrain:np-builtin-aliases
Nov 29, 2021
Merged

Eschew deprecated numpy aliases for builtins#61
lukapecnik merged 1 commit intofirefly-cpp:masterfrom
musicinmybrain:np-builtin-aliases

Conversation

@musicinmybrain
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

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

@allcontributors
Copy link
Copy Markdown
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