Skip to content

Updates references to numpy deprecated type aliases. #6140

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

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

arcra
Copy link
Member

@arcra arcra commented Jan 12, 2023

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.

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] numpy.org/doc/stable/release/1.20.0-notes.html#using-the-aliases-of-builtin-types-like-np-int-is-deprecated
[2] numpy.org/doc/stable/release/1.24.0-notes.html#expired-deprecations
@arcra arcra requested a review from nfelt January 12, 2023 01:41
@arcra arcra merged commit 7bcc5e8 into tensorflow:master Jan 12, 2023
arcra added a commit to arcra/tensorboard that referenced this pull request Jan 12, 2023
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)
@arcra arcra mentioned this pull request Jan 12, 2023
arcra added a commit to arcra/tensorboard that referenced this pull request Jan 12, 2023
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)
arcra added a commit that referenced this pull request Jan 13, 2023
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)
yatbear pushed a commit to yatbear/tensorboard that referenced this pull request Mar 27, 2023
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.
dna2github pushed a commit to dna2fork/tensorboard that referenced this pull request May 1, 2023
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.
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.

2 participants