Hi,
I'm getting an error in the function num_nodes because sometimes self.G is a list.
|
def num_nodes(self) -> int: |
Would it possible to update such function and just return the length of the attribute G.nodes? Something like this
@property
def num_nodes(self) -> int:
r"""
Return number of nodes in the graph.
Returns:
int: Number of nodes in the graph.
"""
G = None
if isinstance(self.G, list):
G = self.G[0]
else:
G = self.G
return len(G.nodes)
Thanks in advance
Hi,
I'm getting an error in the function
num_nodesbecause sometimesself.Gis a list.deepsnap/deepsnap/graph.py
Line 220 in 6197dce
Would it possible to update such function and just return the length of the attribute
G.nodes? Something like thisThanks in advance