Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dmitrysarov opened this issue Jan 24, 2025 · 1 comment
Open

Comments

@dmitrysarov
Copy link

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

@lmcinnes
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants