pathpyG icon indicating copy to clipboard operation
pathpyG copied to clipboard

Bug in handling of `EdgeIndex.sparse_size` and `Data.num_nodes`

Open IngoScholtes opened this issue 1 year ago • 1 comments

Turning a directed graph with isolated nodes into an undirected graph yields an error:

Minimal example

import pathpyG as pp
g = pp.Graph.from_edge_list([('a', 'b')], num_nodes=3)
g_u = g.to_undirected()

This is due to the fact that the function to_undirected does not properly set the sparse_size of the undirected EdgeIndex

IngoScholtes avatar Sep 20 '24 10:09 IngoScholtes

Will be fixed in #201

IngoScholtes avatar Sep 20 '24 10:09 IngoScholtes