Here is the python code that I tried:
import igraph
g = igraph.read('/usr/not-backed-up/31-0.gml')
print g.vs[0].attributes()
{'id': 0.0, 'label': 'labsv'}
Relevant part of 31-0.gml looks like this:
graph [
directed 0
node [
id 0
label "labsv"
]
Thanks,
dksr
On Thu, Jul 11, 2013 at 12:00 PM, Krishna Sandeep Reddy Dubba <
[email protected]> wrote:
> Hi all,
> I generate a gml file with nodes having an integer attribute. But when I
> read it back using igraph.read, the attribute values are floats.
>
> for example this is how I generating gml file:
>
> count = 0 # My intention is to make the attribute value an integer,
> otherwise I can use 0.0
> for loop:
> node_attribute = count
> count += 1
>
> But when I read the gml file using igraph, the node attribute becomes
> float, i.e. 0.0
>
> Is it a bug or am I doing some silly mistake?
>
> Cheers,
> dksr
>
>
>
>
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help