def __init__(self, scale: Union[Sequence[float], float] = 1.5) -> None:
        """IQR Detector

        Flags values that lie outside of the interquartile range (IQR)
        by more than a certain factor of IQR's value as anomalies.
        The factor is passed in the `scale` parameter.

        If a single value is provided for `scale`,
        this same value will be used across all components of the series.

        If a sequences of values is given for the `scale` parameter,
        it's length must match the dimensionality of the series passed.

        Parameters
        ----------
        scale
            (Sequence of) scale(s) used to indicate what distance from the IQR constitutes an anomaly.
            Defaults to `1.5`. Must be non-negative. If a sequence, must match the dimensionality of the series
            this detector is applied to.
        """

        # Parent QuantileDetector will compute Q1 and Q3 thresholds
        super().__init__(low_quantile=0.25, high_quantile=0.75)

        self.scale = np.array(scale)
        if self.scale.ndim == 0:
            self.scale = np.expand_dims(self.scale, 0)

        if not np.issubdtype(self.scale.dtype, np.number) or (self.scale < 0.0).any():
            raise_log(
                ValueError("All values in `scale` must be non-negative numbers."),
                logger=logger,
            )
IQR Detector

        Flags values that lie outside of the interquartile range (IQR)
        by more than a certain factor of IQR's value as anomalies.
        The factor is passed in the `scale` parameter.

        If a single value is provided for `scale`,
        this same value will be used across all components of the series.

        If a sequences of values is given for the `scale` parameter,
        it's length must match the dimensionality of the series passed.

        Parameters
        ----------
        scale
            (Sequence of) scale(s) used to indicate what distance from the IQR constitutes an anomaly.
            Defaults to `1.5`. Must be non-negative. If a sequence, must match the dimensionality of the series
            this detector is applied to.
        
darts/ad/detectors/iqr_detector.py