On Thursday, June 14, 2012 3:27:41 PM UTC+1, jason wrote: > > So, to be clear, the new networkx function does not give you as much > information as the old one?
Yes, that is the case. The (weighted) clustering coefficient algorithm (with weighted *edges*) computes some auxiliary *vertex* weights. The old method used to return all of it, the new one just returns the clustering coefficients > Generally, in the Sage wrapper for the > networkx function, you'd "correct" the return output to take care of the > backwards incompatibility. Is there a way to get the missing > information easily? > Well, kind of easily. I can just copy over the lines from the old networkx and since it is pure python it will probably work. Should I do that with an additional "backwards_compatible" boolean variable set on True by default? def sage_function(..., backwards_compatible = True) if not backward_compatible: results = networkx.function(...) else: deprecation_warning(...) # Copy about 20 lines of old networkx code here results = ... (obtained from the old code) return results Adding the missing information alone takes about the same work as computing the whole thing... J. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org