You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates references to numpy deprecated type aliases. (#6140)
Numpy library deprecated some type aliases in version 1.20.0 [1], and
then removed them in version 1.24.0 [2], which was released on Dec 18,
2022.
Without this change, our build would be broken when using numpy version
>= 1.24.0,
with error `AttributeError: module 'numpy' has no attribute 'float'`.
The fix suggested in release notes from numpy version 1.20.0 is to
replace these types with the equivalent primitive python types. (In this
case, simply `float`.)
[1]
http://numpy.org/doc/stable/release/1.20.0-notes.html#using-the-aliases-of-builtin-types-like-np-int-is-deprecated
[2]
http://numpy.org/doc/stable/release/1.24.0-notes.html#expired-deprecations
* Motivation for features / changes
Newer numpy versions break our build. This code is exactly equivalent,
as the identifiers used previously were aliases for the same type.
* Technical description of changes
Replace occurrences of `np.float` for the primitive type `float`.
* Screenshots of UI changes
N/A
* Detailed steps to verify changes work correctly (as executed by you)
Ran tests.
* Alternate designs / implementations considered
N/A.
(cherry picked from commit 7bcc5e8)
0 commit comments