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

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

Open
bingyinglee opened this issue Mar 26, 2024 · 0 comments

Comments

@bingyinglee
Copy link

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.

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

1 participant