firefly-cpp / NiaAML

Python automated machine learning framework.
MIT License
29 stars 12 forks source link

Eschew deprecated numpy aliases for builtins #61

Closed musicinmybrain closed 2 years ago

musicinmybrain commented 2 years ago

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.

musicinmybrain commented 2 years ago

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 commented 2 years ago

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

allcontributors[bot] commented 2 years ago

@lukapecnik

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