hdbscan icon indicating copy to clipboard operation
hdbscan copied to clipboard

X[labels == cluster_id, :] implicitly expect X to be numpy array

Open dmitrysarov opened this issue 11 months ago • 1 comments

Probably type check should be performed. In my case X was list and i received

subset_X = X[labels == cluster_id, :]

TypeError: list indices must be integers or slices, not tuple

dmitrysarov avatar Jan 24 '25 12:01 dmitrysarov

Following scikit-learn procedures there should be a call to check_array prior to that which ensures certain formats. Can you actually refer to the line in the code?

lmcinnes avatar Jan 24 '25 15:01 lmcinnes