Hi, On Thu, Jul 11, 2013 at 7:00 AM, 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 > Which language is this? It is actually helpful to send a reproducible example, because then at least we know if you are using C, R or Python. If this is R, then note that it R 0 is not an integer, it is a double. 0L is an integer: is.integer(0) # [1] FALSE is.integer(0L) # [1] TRUE However, R igraph does not support integer attributes, only doubles. Best, Gabor > > 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 > >
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
