Skip to content

Commit

Permalink
Fix bug with max_points in MH when the number of maxima is small.
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmabus committed Jun 29, 2023
1 parent c4b2a66 commit e56b1b4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def __call__(self, X: FDataGrid) -> NDArrayInt:
values = X.data_matrix[:, indexes]
partition_indexes = np.argpartition(
values,
-self.max_points,
-min(self.max_points, len(values)),
axis=None,
)
indexes = indexes[np.sort(partition_indexes[-self.max_points:])]
Expand Down

0 comments on commit e56b1b4

Please sign in to comment.