Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions imgaug/imgaug.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,14 @@
# 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"])
try:
NP_FLOAT_TYPES = set(np.sctypes["float"])
NP_INT_TYPES = set(np.sctypes["int"])
NP_UINT_TYPES = set(np.sctypes["uint"])
except AttributeError:
NP_FLOAT_TYPES = set([np.float16, np.float32, np.float64])
NP_INT_TYPES = set([np.int8, np.int16, np.int32, np.int64])
NP_UINT_TYPES = set([np.uint8, np.uint16, np.uint32, np.uint64])

IMSHOW_BACKEND_DEFAULT = "matplotlib"

Expand Down