pathpy / pathpyG

GPU-accelerated Next-Generation Network Analytics and Graph Learning for Time Series Data on Complex Networks.
https://www.pathpy.net
GNU Affero General Public License v3.0
31 stars 1 forks source link

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

Open IngoScholtes opened 1 week ago

IngoScholtes commented 1 week ago

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 commented 1 week ago

Will be fixed in #201