def fit(self, signal) -> "CostCLinear":
        """Set parameters of the instance.

        Args:
            signal (array): signal of shape (n_samples, n_dims) or (n_samples,)

        Returns:
            self
        """
        if signal.ndim == 1:
            self.signal = signal.reshape(-1, 1)
        else:
            self.signal = signal

        return self
Set parameters of the instance.

        Args:
            signal (array): signal of shape (n_samples, n_dims) or (n_samples,)

        Returns:
            self
        
src/ruptures/costs/costclinear.py