From 27e73da08271c4ec0fb9fc0be6b72c39440106bf Mon Sep 17 00:00:00 2001 From: Matthieu Muller <matthieu.muller@gipsa-lab.grenoble-inp.fr> Date: Wed, 15 Nov 2023 16:23:26 +0100 Subject: [PATCH] Removed unused check --- src/checks.py | 14 -------------- src/utils.py | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/checks.py b/src/checks.py index 1201813..4201a01 100644 --- a/src/checks.py +++ b/src/checks.py @@ -71,20 +71,6 @@ def check_data_range(img: np.ndarray) -> None: raise Exception(f'Pixel\'s values must be in range [0, 1]. Got range [{np.min(img)}, {np.max(img)}].') -def check_len(img1_list: list | np.ndarray, img2_list: list | np.ndarray) -> None: - """Checks if two lists have the same length. - - Args: - img1_list (list | np.ndarray): First list. - img2_list (list | np.ndarray): Secind list. - - Raises: - Exception: Exception if the two list do not have the same length. - """ - if len(img1_list) != len(img2_list): - raise Exception(f'The two lists must have the same length. Got {len(img1_list)} and {len(img2_list)}.') - - def check_cfa(cfa: str) -> None: """Checks if the CFA's name is correct. diff --git a/src/utils.py b/src/utils.py index 7a5340f..e721327 100755 --- a/src/utils.py +++ b/src/utils.py @@ -7,7 +7,7 @@ from skimage.metrics import peak_signal_noise_ratio, structural_similarity from skimage.io import imread, imsave import numpy as np -from src.checks import check_len, check_data_range, check_rgb, check_shape, check_path, check_png +from src.checks import check_data_range, check_rgb, check_shape, check_path, check_png def normalise_image(img: np.ndarray) -> np.ndarray: -- GitLab