Skip to content
Snippets Groups Projects

Check inputs

Merged Bert Palm requested to merge checkInputs into develop
Files
7
@@ -96,8 +96,7 @@ class ChangepointsMixin:
validateCallable(stat_func, "stat_func")
validateCallable(thresh_func, "thresh_func")
validateCallable(reduce_func, "reduce_func")
if reduce_window is not None:
validateWindow(reduce_window, name="reduce_window", allow_int=False)
# Hint: windows are checked in _getChangePoints
mask = _getChangePoints(
data=self._data[field],
@@ -183,8 +182,7 @@ class ChangepointsMixin:
validateCallable(stat_func, "stat_func")
validateCallable(thresh_func, "thresh_func")
validateCallable(reduce_func, "reduce_func")
if reduce_window is not None:
validateWindow(reduce_window, name="reduce_window", allow_int=False)
# Hint: windows are checked in _getChangePoints
rtyp = "residual" if model_by_resids else "cluster"
cluster = _getChangePoints(
@@ -244,7 +242,7 @@ def _getChangePoints(
validateWindow(window, name="window", allow_int=False)
bwd_window = fwd_window = window
if isinstance(window, (list, tuple)):
if isinstance(min_periods, (list, tuple)):
bwd_min_periods, fwd_min_periods = min_periods
validateMinPeriods(bwd_min_periods, "min_periods[0]")
validateMinPeriods(fwd_min_periods, "min_periods[1]")
Loading