pvanalytics icon indicating copy to clipboard operation
pvanalytics copied to clipboard

Tests emit `RuntimeWarning` from `ruptures`

Open kandersolar opened this issue 5 months ago • 0 comments

From https://github.com/pvlib/pvanalytics/actions/runs/16749387378/job/47415518403#step:5:62

pvanalytics/tests/quality/test_outliers.py::test_zscore_all_same
pvanalytics/tests/quality/test_time.py::test_shifts_ruptures_shift_at_end[h]
pvanalytics/tests/quality/test_time.py::test_shifts_ruptures_shift_in_middle[h]
pvanalytics/tests/quality/test_time.py::test_shifts_ruptures_shift_at_end[15min]
pvanalytics/tests/quality/test_time.py::test_shifts_ruptures_shift_in_middle[15min]
pvanalytics/tests/quality/test_time.py::test_shifts_ruptures_shift_at_end[1min]
pvanalytics/tests/quality/test_time.py::test_shifts_ruptures_shift_in_middle[1min]
  /Users/runner/work/pvanalytics/pvanalytics/pvanalytics/quality/outliers.py:78: RuntimeWarning: Precision loss occurred in moment calculation due to catastrophic cancellation. This occurs when the data are nearly identical. Results may be unreliable.
    is_outlier.loc[~nan_mask] = abs(stats.zscore(data[~nan_mask])) > zmax

@kperrynrel maybe we should tweak those tests? I didn't look into it myself.

kandersolar avatar Aug 05 '25 16:08 kandersolar