Skip to content

Commit

Permalink
Fix error on empty masks list (#1494)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dipet authored Nov 5, 2023
1 parent a371527 commit 515de6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion albumentations/core/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _check_args(self, **kwargs) -> None:
raise TypeError("{} must be numpy array type".format(data_name))
shapes.append(data.shape[:2])
if internal_data_name in checked_multi:
if data is not None:
if data is not None and len(data):
if not isinstance(data[0], np.ndarray):
raise TypeError("{} must be list of numpy arrays".format(data_name))
shapes.append(data[0].shape[:2])
Expand Down

0 comments on commit 515de6e

Please sign in to comment.