def partial_fit(self, X, y=None):
        X = check_array(X, accept_sparse='csr')
        if not hasattr(self, 'hash_functions_'):
            return self.fit(X)

        if X.shape[1] != self._fit_X.shape[1]:
            raise ValueError("Number of features in X and"
                             " fitted array does not match.")
        n_samples = X.shape[0]
        n_indexed = self._fit_X.shape[0]

        for i in range(self.n_estimators):
            bin_X = self.hash_functions_[i].transform(X)[:, 0]
            # gets the position to be added in the tree.
            positions = self.trees_[i].searchsorted(bin_X)
            # adds the hashed value into the tree.
            self.trees_[i] = np.insert(self.trees_[i],
                                       positions, bin_X)
            # add the entry into the original_indices_.
            self.original_indices_[i] = np.insert(self.original_indices_[i],
                                                  positions,
                                                  np.arange(n_indexed,
                                                            n_indexed +
                                                            n_samples))

        # adds the entry into the input_array.
        if sparse.issparse(X) or sparse.issparse(self._fit_X):
            self._fit_X = sparse.vstack((self._fit_X, X))
        else:
            self._fit_X = np.row_stack((self._fit_X, X))

        return self
Inserts new data into the already fitted LSH Forest.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/neighbors/approximate.py/LSHForest.partial_fit