Skip to content

from_networkx() and to_networkx() method are not working #103

Description

@skmda37

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions