Skip to content

Commit

Permalink
feat: add custom sort function for DensePartitions's sort_samples_and…
Browse files Browse the repository at this point in the history
…_feature_values
  • Loading branch information
Ishticode committed Dec 1, 2023
1 parent 319c283 commit 91fb282
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ivy/functional/frontends/sklearn/tree/_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,7 @@ def node_split_best(


def sort(feature_values, samples, n):
return 0, 0
if n == 0:
return
idx = ivy.argsort(feature_values)
return feature_values[idx], samples[idx]

0 comments on commit 91fb282

Please sign in to comment.