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

Issue with node_edge_centrality #616

Closed
nwlandry opened this issue Nov 5, 2024 · 1 comment · Fixed by #600
Closed

Issue with node_edge_centrality #616

nwlandry opened this issue Nov 5, 2024 · 1 comment · Fixed by #600
Labels
bug Something isn't working

Comments

@nwlandry
Copy link
Collaborator

nwlandry commented Nov 5, 2024

I have been trying to get the node_edge_centrality to work, but for this minimal working example,

import xgi
H = xgi.load_xgi_data("email-enron")
H.cleanup()
c5 = H.nodes.node_edge_centrality.asnumpy()

it raises the error

RuntimeWarning: invalid value encountered in divide
  new_x = np.sign(u[0].item()) * u
RuntimeWarning: invalid value encountered in divide
  new_y = np.sign(v[0].item()) * v
UserWarning: Iteration did not converge!
  warn("Iteration did not converge!")

This shouldn't happen because the graph is connected, but maybe I'm missing something.

@nwlandry nwlandry added the bug Something isn't working label Nov 5, 2024
@maximelucas
Copy link
Collaborator

Not providing a solution but just confirming I get the same.
It's a warning though and not an error, so there is an output but it's an array full os NaNs.

@nwlandry nwlandry linked a pull request Nov 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants