processing.shape_check.check_forecast_shape( y, reference,*, min_corr=0.6, min_range_ratio=0.5, min_overlap=12,)
Measure correlation and daily-range ratio between a forecast and its reference.
Ports the plausibility metrics from the operational warn_if_implausible_shape (script lines ~951-965): Pearson correlation on the index intersection and the ratio of forecast range to reference range. A zero-reference range produces float('nan') for range_ratio (zero-range guard).
This function is pure: it performs no logging, no warning emission, and no raising on an implausible result. Callers receive a ShapeCheckReport and decide how to act. Only invalid inputs (non-Series arguments, empty series) raise.
/Users/bartz/workspace/spotforecast2-safe/.venv/lib/python3.13/site-packages/numpy/lib/_function_base_impl.py:3023: RuntimeWarning: invalid value encountered in divide
c /= stddev[:, None]
/Users/bartz/workspace/spotforecast2-safe/.venv/lib/python3.13/site-packages/numpy/lib/_function_base_impl.py:3024: RuntimeWarning: invalid value encountered in divide
c /= stddev[None, :]