def length(self, vertices):
        """
        Return the total length of the entity.

        Returns
        ---------
        length: float, total length of entity
        """
        length = ((np.diff(self.discrete(vertices),
                           axis=0)**2).sum(axis=1)**.5).sum()
        return length
def length ( self , vertices ) : length = ( ( np . diff ( self . discrete ( vertices ) , axis = 0 ) ** 2 ) . sum ( axis = 1 ) ** .5 ) . sum ( ) return length
Return the total length of the entity.

        Returns
        ---------
        length: float, total length of entity