From 07818c591ba1a8cb0ee2f12bd88b40595d9644da Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Mon, 10 Jun 2024 18:38:29 +0200 Subject: [PATCH] fix: remove literal from docstrings to see if it flies --- src/eddymotion/data/filtering.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/eddymotion/data/filtering.py b/src/eddymotion/data/filtering.py index 30e8caec..6b319cb6 100644 --- a/src/eddymotion/data/filtering.py +++ b/src/eddymotion/data/filtering.py @@ -28,13 +28,16 @@ from scipy.ndimage import median_filter from skimage.morphology import ball +DEFAULT_DTYPE = "int16" +"""The default image's data type.""" + def advanced_clip( data: np.ndarray, p_min: float = 35, p_max: float = 99.98, nonnegative: bool = True, - dtype: str | np.dtype = "int16", + dtype: str | np.dtype = DEFAULT_DTYPE, invert: bool = False, ) -> np.ndarray: """ @@ -58,7 +61,7 @@ def advanced_clip( are set to the threshold value. nonnegative : :obj:`bool`, optional (default=``True``) If True, only consider non-negative values when calculating thresholds. - dtype : :obj:`str` or :obj:`~numpy.dtype`, optional (default=``"int16"``) + dtype : :obj:`str` or :obj:`~numpy.dtype`, optional The desired data type for the output array. Supported types are "uint8" and "int16". invert : :obj:`bool`, optional (default=``False``)