Skip to content

Conversation

@hvaara
Copy link
Contributor

@hvaara hvaara commented Jan 5, 2023

This change replaces references to a number of deprecated NumPy type aliases (np.bool, np.int, np.float, np.complex, np.object, np.str) with their recommended replacement (bool, int, float, complex, object, str).

NumPy 1.24 drops the deprecated aliases, so we must remove uses before updating NumPy.

See huggingface/diffusers#1810 for a similar issue in diffusers.

Co-authored-by: Peter Hawkins [email protected]

This change replaces references to a number of deprecated NumPy type aliases (np.bool, np.int, np.float, np.complex, np.object, np.str) with their recommended replacement (bool, int, float, complex, object, str).

NumPy 1.24 drops the deprecated aliases, so we must remove uses before updating NumPy.

Co-authored-by: Peter Hawkins <[email protected]>
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jan 5, 2023

The documentation is not available anymore as the PR was closed or merged.

@hvaara hvaara changed the title [WIP][NumPy] Remove references to deprecated NumPy type aliases. [NumPy] Remove references to deprecated NumPy type aliases. Jan 5, 2023
@hvaara hvaara changed the title [NumPy] Remove references to deprecated NumPy type aliases. [NumPy] Remove references to deprecated NumPy type aliases Jan 5, 2023
@hvaara hvaara marked this pull request as ready for review January 5, 2023 14:38
@hvaara
Copy link
Contributor Author

hvaara commented Jan 5, 2023

@sgugger I heard you might be the right person to review this. Please let me know if you have any questions 🤗

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes!

@sgugger sgugger merged commit 35a7052 into huggingface:main Jan 5, 2023
@hvaara hvaara deleted the numpy-type-aliases branch January 6, 2023 11:27
silverriver pushed a commit to silverriver/transformers that referenced this pull request Jan 6, 2023
…ce#21022)

[NumPy] Remove references to deprecated NumPy type aliases.

This change replaces references to a number of deprecated NumPy type aliases (np.bool, np.int, np.float, np.complex, np.object, np.str) with their recommended replacement (bool, int, float, complex, object, str).

NumPy 1.24 drops the deprecated aliases, so we must remove uses before updating NumPy.

Co-authored-by: Peter Hawkins <[email protected]>

Co-authored-by: Peter Hawkins <[email protected]>
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.

3 participants