Skip to content

Commit

Permalink
Python3 comparisons on uncomparable types are more strict
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcinnes committed Aug 20, 2016
1 parent 2ed32d2 commit a657a9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hdbscan/hdbscan_.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def hdbscan(X, min_cluster_size=5, min_samples=None, alpha=1.0,
if min_samples <= 0 or min_cluster_size <= 0:
raise ValueError('Min samples and Min cluster size must be positive integers')

if alpha <= 0.0 or type(alpha) is not float:
if type(alpha) is not float or alpha <= 0.0:
raise ValueError('Alpha must be a positive float value greater than 0!')

if leaf_size < 1:
Expand Down

0 comments on commit a657a9b

Please sign in to comment.