def METHOD_NAME(  # noqa: D102
    self,
    X: FData | NDArrayFloat,
    y: object = None,
) -> NDArrayFloat:
    check_is_fitted(self, '_is_fitted')
    if callable(X):
        if self.eval_points is None:
            assert isinstance(X, FDataGrid)
            evaluation = X.data_matrix.copy()
        else:
            evaluation = X(
                self.eval_points,
                extrapolation=self.extrapolation,
                grid=self.grid,
            )
    else:
        evaluation = X
    return evaluation.reshape((len(X), -1))