def transform(self, X):
        """Reduce the dimensionality of each time series.

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_timestamps)

        Returns
        -------
        X_new : array, shape = (n_samples, n_timestamps_new)

        """
        X = check_array(X)
        n_samples, n_timestamps = X.shape

        window_size, output_size = self._check_params(n_timestamps)
        if window_size == 1:
            return X
        else:
            start, end, n_timestamps_new = segmentation(
                n_timestamps, window_size, self.overlapping, output_size
            )
            X_paa = _paa(X, n_samples, n_timestamps,
                         start, end, n_timestamps_new)
            return X_paa
Reduce the dimensionality of each time series.

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_timestamps)

        Returns
        -------
        X_new : array, shape = (n_samples, n_timestamps_new)

        
pyts/approximation/paa.py