diff --git a/src/darsia/restoration/averaging.py b/src/darsia/restoration/averaging.py index caf36977..eaa4d881 100644 --- a/src/darsia/restoration/averaging.py +++ b/src/darsia/restoration/averaging.py @@ -1,6 +1,6 @@ """Module with tools for volume averaging.""" -from typing import Optional, Union, overload +from typing import Union, overload import numpy as np import scipy.ndimage @@ -57,8 +57,10 @@ def __init__(self, rev: REV, mask: darsia.Image) -> None: @overload # type: ignore [override] def __call__(self, img: np.ndarray) -> np.ndarray: ... + @overload # type: ignore [override] def __call__(self, img: darsia.Image) -> darsia.Image: ... + def __call__( self, img: Union[np.ndarray, darsia.Image] ) -> Union[np.ndarray, darsia.Image]: