Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

changed np.bool deprecated in numpy 1.20.0, changed to bool #47

Closed

Conversation

anon-it
Copy link

@anon-it anon-it commented Mar 24, 2023

Related to this commit a04d1bd.

np.bool was a deprecated alias for the builtin bool. To avoid this error in existing code, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

@@ -252,7 +252,7 @@ class TritonPreprocessRequest(BasePreprocessRequest):
np.uint64: 'uint64_contents',
np.int32: 'int_contents',
np.uint: 'uint_contents',
np.bool: 'bool_contents',
bool: 'bool_contents',
Copy link
Member

Choose a reason for hiding this comment

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

For backwards compatibility, can you please change bool to getattr(np, 'bool', bool)? 🙏

@jkhenning
Copy link
Member

@anon-it, can you please address the comments?

@jkhenning
Copy link
Member

Closing this as the fix has already been introduced.

@jkhenning jkhenning closed this Aug 6, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants