Skip to content

Commit fc24f99

Browse files
committed
Error on bad min_cluster_size as per #48
1 parent 97ce83b commit fc24f99

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hdbscan/hdbscan_.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@ def hdbscan(X, min_cluster_size=5, min_samples=None, alpha=1.0,
454454
raise ValueError('Min samples and Min cluster size must be positive'
455455
' integers')
456456

457+
if min_cluster_size == 1:
458+
raise ValueError('Min cluster size must be greater than one')
459+
457460
if not isinstance(alpha, float) or alpha <= 0.0:
458461
raise ValueError('Alpha must be a positive float value greater than'
459462
' 0!')

0 commit comments

Comments
 (0)