Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tutorial example fails with attribute error from Networkx #11

@ethank5149

Description

@ethank5149

Downgrading to networkx==2.0.0 fixes the issue.

Traceback:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-10-d9a7cd309bb5> in <module>
      1 # Generate square grid graph with auxiliary nodes for spanning cluster detection
----> 2 grid = percolate.spanning_2d_grid(3)

~\anaconda3\lib\site-packages\percolate\percolate.py in spanning_2d_grid(length)
    956     for i in range(length):
    957         # side 0
--> 958         ret.node[(0, i)]['span'] = 0
    959         ret[(0, i)][(1, i)]['span'] = 0
    960 

AttributeError: 'Graph' object has no attribute 'node'

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