diff --git a/src/insight/metrics/metrics.py b/src/insight/metrics/metrics.py index 9f4d1cc8..f2ff23e2 100644 --- a/src/insight/metrics/metrics.py +++ b/src/insight/metrics/metrics.py @@ -534,4 +534,5 @@ def _compute_metric(self, sr_a: pd.Series, sr_b: pd.Series) -> float: """ if sr_a.empty or sr_b.empty: return 1.0 - return ks_2samp(sr_a, sr_b)[0] # The first element is the KS statistic + + return ks_2samp(sr_a.dropna(), sr_b.dropna())[0] # The first element is the KS statistic