(self, X, y=None)
return self
Do nothing and return the estimator unchanged.

        This method is here to implement the usual scikit-learn API and hence
        work in pipelines.

        Parameters
        ----------
        X : ndarray of shape (n_samples, n_pixels_1, ..., n_pixels_d)
            Input data. Array of d-dimensional images.

        y : None
            There is no need of a target in a transformer, yet the pipeline API
            requires this parameter.

        Returns
        -------
        self : object
Do nothing and return the estimator unchanged.
Do nothing and return the estimator unchanged .
def fit(self, X, y=None):
        """Do nothing and return the estimator unchanged.

        This method is here to implement the usual scikit-learn API and hence
        work in pipelines.

        Parameters
        ----------
        X : ndarray of shape (n_samples, n_pixels_1, ..., n_pixels_d)
            Input data. Array of d-dimensional images.

        y : None
            There is no need of a target in a transformer, yet the pipeline API
            requires this parameter.

        Returns
        -------
        self : object

        """
        X = check_collection(X, force_all_finite=False)
        validate_params(
            self.get_params(), self._hyperparameters, exclude=['n_jobs'])

        self._filtration_kwargs = {}
        if self.periodic_dimensions is None or \
           np.sum(self.periodic_dimensions) == 0:
            self._filtration = CubicalComplex
            self.periodic_dimensions_ = np.zeros(len(X) - 1, dtype=bool)
        else:
            self._filtration = PeriodicCubicalComplex
            self.periodic_dimensions_ = np.array(self.periodic_dimensions,
                                                 dtype=bool)
            self._filtration_kwargs['periodic_dimensions'] = \
                self.periodic_dimensions_

        if self.infinity_values is None:
            if hasattr(X, 'shape'):
                self.infinity_values_ = np.max(X)
            else:
                self.infinity_values_ = max(map(np.max, X))
        else:
            self.infinity_values_ = self.infinity_values

        self._homology_dimensions = sorted(self.homology_dimensions)
        self._max_homology_dimension = self._homology_dimensions[-1]

        return self
def fit ( self , X , y = None ) : X = check_collection ( X , force_all_finite = False ) validate_params ( self . get_params ( ) , self . _hyperparameters , exclude = [ 'n_jobs' ] ) self . _filtration_kwargs = { } if self . periodic_dimensions is None or np . sum ( self . periodic_dimensions ) == 0 : self . _filtration = CubicalComplex self . periodic_dimensions_ = np . zeros ( len ( X ) - 1 , dtype = bool ) else : self . _filtration = PeriodicCubicalComplex self . periodic_dimensions_ = np . array ( self . periodic_dimensions , dtype = bool ) self . _filtration_kwargs [ 'periodic_dimensions' ] = self . periodic_dimensions_ if self . infinity_values is None : if hasattr ( X , 'shape' ) : self . infinity_values_ = np . max ( X ) else : self . infinity_values_ = max ( map ( np . max , X ) ) else : self . infinity_values_ = self . infinity_values self . _homology_dimensions = sorted ( self . homology_dimensions ) self . _max_homology_dimension = self . _homology_dimensions [ - 1 ] return self