I am using gt.scalar_assortativity and I observed that it returns non-zero values and big variance values even when the values on the nodes are exactly same. g = gt.collection.data['karate'] s = g.new_vertex_property('float') for v in g.vertices(): s[v] = 0.9999 gt.scalar_assortativity(g, deg = s)