I used igraph to create a citation graph from dblp dataset. I want to get adjacency matrix of the graph for further process. After saving generated graph in GraphML format, I tried using that file to generate adjacency_matrix.
g = Graph.Read_GraphML('graph.GraphML')
>>> summary(g)
IGRAPH DN-- 629814 632751 --
+ attr: id (v), name (v), title (v), year (v)
This shows that the graph has 629814 vertices and 632751 edges. The problem comes in adjacency matrix
m = g.get_adjacency()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/igraph/__init__.py", line 541, in get_adjacency
return Matrix(GraphBase.get_adjacency(self, type))
MemoryError: Error at vector.pmt:130: cannot init vector, Out of memory
The question is what are the effective ways to generate adjacency matrix considering this MemoryError.