pygsp icon indicating copy to clipboard operation
pygsp copied to clipboard

from_networkx() and to_networkx() method are not working

Open skmda37 opened this issue 3 years ago • 0 comments

The API example for the from_networkx() method is:

import networkx as nx
graph = nx.Graph()
graph.add_edge(1, 2, weight=0.2)
graph.add_edge(2, 3, weight=0.9)
graph.add_node(4, sig=3.1416)
graph.nodes()

graph = pygsp.graphs.Graph.from_networkx(graph)
graph.W.toarray()
graph.signals

I get the error AttributeError: type object 'Graph' has no attribute 'from_networkx' and have similar errors with the to_networkx() method and the LineGraph method.

My version of pygsp is 0.5.1 and for networkx 2.8.4 if that helps...

Thanks in advance!

skmda37 avatar Jul 18 '22 10:07 skmda37