a-r-j / graphein

Protein Graph Library
https://graphein.ai/
MIT License
1.03k stars 131 forks source link

Saving in gexf format #75

Closed shrimonmuke0202 closed 3 years ago

shrimonmuke0202 commented 3 years ago

An error occurs when saving protein atomic graph in gexf format.

attribute value type is not allowed: <class 'numpy.ndarray'>

How can I overcome this problem?

a-r-j commented 3 years ago

Hi @shrimonmuke0202, gexf only supports a limited set of datatypes. You can check page 8 here: https://gephi.org/gexf/1.2draft/gexf-12draft-primer.pdf.

You might want to look into other formats more suitable for your purpose or write your own I/O. Pickinling should work fine if you simply want to save & reload graphs.