Skip to content

Commit

Permalink
fix: empty point check
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Oct 25, 2023
1 parent 30b1735 commit ea5ae93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/algorithms/src/clustering/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ pub fn main(
cluster_split_level: u64,
max_clusters: usize,
) -> SingleVec {
if data_points.is_empty() {
return vec![];
}
let time = Instant::now();
let clusters = match cluster_mode {
ClusterMode::Fastest => {
Expand Down

0 comments on commit ea5ae93

Please sign in to comment.