We Are Going To Discuss About Plot NetworkX Graph with numpy array error. So lets Start this Python Article.
Plot NetworkX Graph with numpy array error
- How to solve Plot NetworkX Graph with numpy array error
downgrade networkx to 2.6.3 and it solved this problem for me.
- Plot NetworkX Graph with numpy array error
downgrade networkx to 2.6.3 and it solved this problem for me.
Solution 1
downgrade networkx to 2.6.3 and it solved this problem for me.
Original Author hiroki Of This Content
Solution 2
Upgrade both scipy
and networkx
and it worked for me.
pip install --upgrade scipy networkx
Original Author lyh458 Of This Content
Solution 3
I looked into the scipy file that was generating that error (“convert_matrix.py”) line 921: A = sp.sparse.coo_array((d, (r, c)), shape=(nlen, nlen), dtype=dtype).
You need to switch “coo_array” to “coo_matrix”.
So it should look like: A = sp.sparse.coo_matrix((d, (r, c)), shape=(nlen, nlen), dtype=dtype)
This worked well enough for me for my project
Original Author cocophelps Of This Content
Solution 4
I encountered the same problem and I used pip install scipy==1.8.1
on a Windows system and it worked! I guess it may be because previous versions of ‘scipy.sparse’ don’t have ‘coo_array’.
I tried the methods in the first answer, but they didn’t work for. I also tried to use conda to update scipy to 1.8.1 to no avail.
Original Author Jayz Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.