[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] GraphML RuntimeWarning

From: Tamás Nepusz
Subject: Re: [igraph] GraphML RuntimeWarning
Date: Thu, 4 Sep 2014 15:00:51 +0200

> On the other hand, might there exist a corner case where a
> user loads a GraphML file into python-igraph, but the resulting graph
> object is not what they were expecting because of this silently
> ignoring double `id` attributes?
Well, I think that if the user explicitly provided a vertex attribute named 
"id" in the GraphML file (using <data> tags), then he/she surely wants to see 
these IDs in the imported graph and not the ones that were used as internal 
identifiers in the <node> tags. So I see no problem here even if the two ID 
sets differ -- after all, the <node id="..."> identifiers are meant to be used 
within the GraphML file only anyway.

I will add a patch soon that removes this warning from igraph, so the behaviour 
will be as follows:

- When reading a GraphML file, the <node id="..."> attributes will be converted 
to a "real" vertex attribute named "id" if such an attribute does not exist. If 
it exists, the identifiers in the <node> tags will silently be discarded.

- When writing a GraphML file, the "id" vertex attribute will be stored using a 
<data> tag in each node, and the "id" attributes of the <node> tags will be 
made up by igraph to ensure that they are unique.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]