Skip to content

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

@dmitrysarov

Description

@dmitrysarov

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

Activity

lmcinnes

lmcinnes commented on Jan 24, 2025

@lmcinnes
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lmcinnes@dmitrysarov

        Issue actions

          X[labels == cluster_id, :] implicitly expect X to be numpy array · Issue #670 · scikit-learn-contrib/hdbscan