Skip to content

Commit

Permalink
Fix n_features_in_ in KNeighborsTransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmabus committed Jun 28, 2023
1 parent 706db42 commit c7358a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion skfda/preprocessing/dim_reduction/_neighbor_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def _fit(
fit_with_zeros: bool = True,
) -> SelfType:
ret = super()._fit(X, y)
self.n_features_in_ = self._estimator.n_features_in_

self.n_features_in_ = 1 if isinstance(X, FData) else X.shape[1]

return ret

Expand Down

0 comments on commit c7358a4

Please sign in to comment.