def _extract_deterministic_values(self, series: np.ndarray, name_series: str):
        """Extract deterministic values from `series` (quantile=0.5 if `series` is probabilistic)."""
        if series.shape[2] == 1:
            return series

        logger.warning(
            f"Scorer {str(self)} is expecting `{name_series}` to be a (sequence of) deterministic "
            f"timeseries (number of samples must be equal to 1, found: {series.shape[2]}). The series "
            f"will be converted to a deterministic series by taking the median of the samples.",
        )
        return np.expand_dims(np.quantile(series, q=0.5, axis=2), -1)
Extract deterministic values from `series` (quantile=0.5 if `series` is probabilistic).
darts/ad/scorers/scorers.py