Skip to content

Tests emit RuntimeWarning from ruptures #227

@kandersolar

Description

@kandersolar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions