def transform(self, X):
        """Bin the data.

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_timestamps)
            Data to transform.

        Returns
        -------
        X_new : array, shape = (n_samples, n_timestamps)
            Binned data.

        """
        check_is_fitted(self, 'bin_edges_')
        X = check_array(X, dtype='float64')
        self._check_consistent_lengths(X)
        indices = _digitize(X, self.bin_edges_)
        if isinstance(self._alphabet, str):
            return indices
        else:
            return self._alphabet[indices]
Bin the data.

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_timestamps)
            Data to transform.

        Returns
        -------
        X_new : array, shape = (n_samples, n_timestamps)
            Binned data.

        
pyts/approximation/mcb.py