def size(self, weight=None):
        s=sum(self.degree(weight=weight).values())/2
        if weight is None:
            return int(s)
        else:
            return float(s)
Return the number of edges.
dataset/ETHPy150Open networkx/networkx/networkx/classes/tests/timingclasses.py/TimingGraph.size