@property
    @_memo
    def avg_edge_length(self):
        """Average length of all edges in the surface.
        """
        adj = self.adj
        tadj = sparse.triu(adj, 1) # only entries above main diagonal, in coo format
        edgelens = np.sqrt(((self.pts[tadj.col] - self.pts[tadj.row])**2).sum(1))
        return edgelens.mean()
dataset/ETHPy150Open gallantlab/pycortex/cortex/polyutils.py/Surface.avg_edge_length/swapped operands of `-`