MCPcopy
hub / github.com/idealo/imagededup / _raise_wrong_dim_value_error

Function _raise_wrong_dim_value_error

imagededup/utils/image_utils.py:43–53  ·  view source on GitHub ↗

Raises ValueError when image array shape is wrong. Args: image_arr_shape: Image array shape.

(image_arr_shape: Tuple)

Source from the content-addressed store, hash-verified

41
42
43def _raise_wrong_dim_value_error(image_arr_shape: Tuple) -> None:
44 """
45 Raises ValueError when image array shape is wrong.
46
47 Args:
48 image_arr_shape: Image array shape.
49 """
50 raise ValueError(
51 f'Received image array with shape: {image_arr_shape}, expected number of image array dimensions are 3 for '
52 f'rgb image and 2 for grayscale image!'
53 )
54
55
56def check_image_array_hash(image_arr: np.ndarray) -> None:

Calls

no outgoing calls