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

add np encoder for json export (#224) #228

Closed hackl closed 1 week ago

hackl commented 1 week ago

Added encoder for np number formats to enable json export.

import pathpyG as pp

# working
t = pp.TemporalGraph.from_edge_list([('a','b',5),('b','c',6)])
pp.plot(t)

# working
t = pp.TemporalGraph.from_edge_list([(0,1,5.),(1,2,6.)])
pp.plot(t)

# now also working
t = pp.TemporalGraph.from_edge_list([(0,1,5),(1,2,6)])
pp.plot(t)