8000 numpy 1.20 bool deprecation · Issue #829 · aleju/imgaug · GitHub
[go: up one dir, main page]

Skip to content

numpy 1.20 bool deprecation #829

Description

@marcown

Hi,

I get the following error:

  File "/home/markus/.local/lib/python3.10/site-packages/imgaug/augmenters/meta.py", line 3368, in _get_augmenter_active
    augmenter_active = np.zeros((nb_rows, len(self)), dtype=np.bool)
  File "/home/markus/.local/lib/python3.10/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])

AttributeError: module 'numpy' has no attribute 'bool
89D5
'.
`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

Any plan to fix this, or am I missing something?

Activity

  1. marcown commented on Feb 13, 2023

    @marcown
    Author

    if you have the same problem:

    Fixed fork

  2. MalteEbner commented on Jun 24, 2024

    @MalteEbner

    I have the same problem and the fix works for me as well :)

  3. Yaser-wyx commented on Oct 24, 2024

    @Yaser-wyx

    A quick solusion for me is set np.bool=bool before import imgaug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0