diff --git a/bob/io/base/__init__.py b/bob/io/base/__init__.py index 87e5213f232e9bf53d2710351e826b0a0824217e..dbe34b9e2e60149ed198e8d6da2d299479eb897b 100644 --- a/bob/io/base/__init__.py +++ b/bob/io/base/__init__.py @@ -137,7 +137,7 @@ def load(inputs): The data loaded from the given ``inputs``. """ - from collections import Iterable + from collections.abc import Iterable import numpy if _is_string(inputs): if not os.path.exists(inputs): @@ -401,9 +401,9 @@ def _generate_features(reader, paths, same_size=False): else: # make sure all features have the same shape and dtype if same_size: - assert shape == list(feature.shape) + assert shape == list(feature.shape), f"Expected feature shape of {shape}, got {feature.shape}" else: - assert shape[1:] == list(feature.shape[1:]) + assert shape[1:] == list(feature.shape[1:]), f"Ignoring first dimension, expected feature shape of {shape}, got {feature.shape}" assert dtype == feature.dtype if same_size: