Skip to content
Snippets Groups Projects
Commit 970ea945 authored by Wolfgang Kastaun's avatar Wolfgang Kastaun
Browse files

Add parameter check to ShiftInverseNumpy

parent e444cbf9
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,11 @@ class ShiftInverseNumpy: # pylint: disable=too-few-public-methods
tolerance: Maximum absolute error of result
"""
self._max_abs_shift: Final = int(np.ceil(max_abs_shift))
if self._max_abs_shift < 0:
msg = f"ShiftInverseNumpy: max_abs_shift must be positive, got {max_abs_shift}"
raise ValueError(msg)
self._interp_np: Final = interp
self._max_iter = int(max_iter)
self._tolerance = float(tolerance)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment