File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -674,7 +674,8 @@ def hdbscan(
674674 if min_samples is None :
675675 min_samples = min_cluster_size
676676
677- if type (min_samples ) is not int or type (min_cluster_size ) is not int :
677+ if not np .issubdtype (type (min_samples ), np .integer ) or \
678+ not np .issubdtype (type (min_cluster_size ), np .integer ):
678679 raise ValueError ("Min samples and min cluster size must be integers!" )
679680
680681 if min_samples <= 0 or min_cluster_size <= 0 :
@@ -685,7 +686,7 @@ def hdbscan(
685686 if min_cluster_size == 1 :
686687 raise ValueError ("Min cluster size must be greater than one" )
687688
688- if type (cluster_selection_epsilon ) is int :
689+ if np . issubdtype ( type (cluster_selection_epsilon ), np . integer ) :
689690 cluster_selection_epsilon = float (cluster_selection_epsilon )
690691
691692 if type (cluster_selection_epsilon ) is not float or cluster_selection_epsilon < 0.0 :
You can’t perform that action at this time.
0 commit comments