imgaug icon indicating copy to clipboard operation
imgaug copied to clipboard

numpy 1.20 bool deprecation

Open marcown opened this issue 2 years ago • 3 comments

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'.
`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?

marcown avatar Feb 12 '23 15:02 marcown

if you have the same problem:

Fixed fork

marcown avatar Feb 13 '23 10:02 marcown

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

MalteEbner avatar Jun 24 '24 17:06 MalteEbner