On Thursday, June 14, 2012 7:19:01 AM UTC-4, Javier López Peña wrote: > > Hi all, > > I am working on the failing doctest to upgrade our almost 2 year old > NetworkX 1.2 to NetworkX 1.6 (see #12806, [1]) I have sorted out the > doctest failures in graph.py and digraph.py; in order to solve the ones in > generic_graph.py there is some design decision that needs to be made. > > The clustering coefficient method in NetworkX used to have (for NX <= 1.4) > different types of output regarding whether or not weights were used in the > computation. > In the older NX, clustering coefficients *without* weights were returned > as a dictionary indexed by the graph vertices, whereas clustering > coefficients *with* weights returned *a couple of dictionaries*, one of > them as before (containing the clustering coefficients) and another one > containing the weights. > > From version 1.5 of NetworkX onwards, this behavior was unified so that > the clustering function would only return the dictionary with the > clustering coefficients, regardless weights are used or not. > > In my opinion this is a reasonable change (why would I want the weights if > I asked for the clustering coefficients?) and we should change Sage to > adopt this behavior. However, doing that requires breaking backwards > compatibility with our clustering_coeff function for weighted graphs, so I > am asking for a public discussion of this. > > > I don't think this should be a problem, but current policy is to first deprecate it for a while (usually I've heard one year, see also #13109 for something that will hopefully work in the future). Presumably you can change the backend but still return the weights for now, and make it really clear what code would be deleted once the deprecation period was over?
- kcrisman -- 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