utils.py 195 B

123456789
  1. import numpy as np
  2. __all__ = [
  3. "assert_single_channel",
  4. ]
  5. def assert_single_channel(image: np.ndarray):
  6. assert len(image.shape) == 2 or (len(image.shape) == 3 and image.shape[2] == 1)