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
{{ message }}
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
bool replaces np.bool, a deprecated alias for the builtin bool; fixes#21165
Bug symptom: Importing mxnet with numpy 1.20+ results in
AttributeError: module 'numpy' has no attribute 'bool'.
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
Checklist
Essentials
PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
Changes are complete (i.e. I finished coding on this PR)
All changes have test coverage
Code is well-documented
Changes
bool replaces np.bool everywhere, since np.bool was an alias to bool anyway, and is no longer defined/bound
Comments
Backwards compatible (according to numpy error message, quoted above)
Hey @mdengler , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:
@mdengler : patch looks good to me, thanks. This project was retired by the community, so there will be no new release anymore.
FYI: I'm using your patch to use the mxnet ImageRecordIter code in a PyTorch project for image classification, which is in my setup almost twice as fast as WebDataSet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
6 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
(Complete-er version of PR #21223)
boolreplacesnp.bool, a deprecated alias for the builtinbool; fixes #21165Bug symptom: Importing
mxnetwithnumpy1.20+ results inChecklist
Essentials
Changes
boolreplacesnp.booleverywhere, sincenp.boolwas an alias toboolanyway, and is no longer defined/boundComments
numpyerror message, quoted above)