Skip to content

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed #14

@bingyinglee

Description

@bingyinglee

According to the code, B is a one-dimensional array obtained by calling A.sum(axis=1), representing the degree of each node. Therefore, one-dimensional index should be used instead of two-dimensional index in updateDeg function. The way to fix this is to use B[i] directly to get the node's degree, instead of B[i, 0].

I'm not sure if this is the case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions