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
33 stars 3 forks source link

ValueError when creating erdos_renyi_gnp graph with p=0 #242

Closed IngoScholtes closed 1 day ago

IngoScholtes commented 1 day ago

When generating a Gnp graph with no edges the following error occurs:

[168] if num_nodes is None:
    [169] num_nodes = mapping.num_ids()
--> [171]edge_index = EdgeIndex(
    [172] mapping.to_idxs(edge_list).T.contiguous(),
    [173] sparse_size=(num_nodes, num_nodes),
    [174]is_undirected=is_undirected,
    [175] return Graph(Data(edge_index=edge_index, num_nodes=num_nodes), mapping=mapping)

ValueError: 'EdgeIndex' holds an unsupported data type (got 'torch.float32', but expected one of {torch.int64, torch.int32})