add_edge_list RuntimeError when converting numpy array
Hi,
Im loading a edge list using Pandas and then creating a graph from it. The edge list is 237,668,462 in length, heres a sample:
df.head()
from_id to_id
0 366413443 800213882
1 366413443 32453930
2 366413443 27260086
3 366413443 28578374
4 366413443 369583954
df.dtypes
from_id uint32
to_id uint32
dtype: object
However I seem to be running into an error:
import pandas as pd
import graph_tool as gt
df = pd.read_hdf('..')
g = gt.Graph()
g.add_edge_list(df.values, hashed=True)
RuntimeError: bad lexical cast: source type value could not be interpreted as target
But if I convert the data into a python list it loads up fine (albeit slow - around 9mins and 64gb of working memory):
g.add_edge_list(df.values.tolist(), hashed=True)
Any ideas?