You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using this graph in example/graph_properties.py I got: /home/jochar/miniconda3/envs/geco/lib/python3.8/site-packages/networkx/algorithms/assortativity/correlation.py:287: RuntimeWarning: invalid value encountered in double_scalars return (xy * (M - ab)).sum() / numpy.sqrt(vara * varb)
The text was updated successfully, but these errors were encountered:
I could not reproduce the error, I loaded the graph and called nx.degree_assortativity_coefficient() on it and -0.020197899023141477 was the result. I looked up the error and it seems like it's a division by zero error because of numerical instability (numbers are too small so they are approximated to zero), I found the info here.
I could not reproduce the error, I loaded the graph and called nx.degree_assortativity_coefficient() on it and -0.020197899023141477 was the result. I looked up the error and it seems like it's a division by zero error because of numerical instability (numbers are too small so they are approximated to zero), I found the info here.
As discussed: We should try to catch this error and set the value to None. And possibly print a warning.
Using this graph in example/graph_properties.py I got:
/home/jochar/miniconda3/envs/geco/lib/python3.8/site-packages/networkx/algorithms/assortativity/correlation.py:287: RuntimeWarning: invalid value encountered in double_scalars return (xy * (M - ab)).sum() / numpy.sqrt(vara * varb)
The text was updated successfully, but these errors were encountered: