Skip to content

Commit

Permalink
Update imgaug.py
Browse files Browse the repository at this point in the history
Modified to work with new numpy versions, see
aleju#859 (comment)
  • Loading branch information
PuchatekwSzortach authored Nov 29, 2024
1 parent 0101108 commit daa1eb6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions imgaug/imgaug.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@
# to check if a dtype instance is among these dtypes, use e.g.
# `dtype.type in NP_FLOAT_TYPES` do not just use `dtype in NP_FLOAT_TYPES` as
# that would fail
NP_FLOAT_TYPES = set(np.sctypes["float"])
NP_INT_TYPES = set(np.sctypes["int"])
NP_UINT_TYPES = set(np.sctypes["uint"])
# Modified to work with new numpy versions, see
# https://github.com/aleju/imgaug/issues/859#issue-2593394731
NP_FLOAT_TYPES = {np.float16, np.float32, np.float64}
NP_INT_TYPES = {np.int8, np.int16, np.int32, np.int64}
NP_UINT_TYPES = {np.uint8, np.uint16, np.uint32, np.uint64}

IMSHOW_BACKEND_DEFAULT = "matplotlib"

Expand Down

0 comments on commit daa1eb6

Please sign in to comment.