polliwog/polyline/polyline.py
def reindexed(self, index, ret_edge_mapping=False):
        """
        Return a new Polyline which reindexes the callee polyline, which much
        be closed, so the vertex with the given index becomes vertex 0.

        ret_edge_mapping: if True, return an array that maps from old edge
            indices to new.
        """
        if not self.is_closed:
            raise ValueError("Can't reindex an open polyline")

        result = Polyline(
            v=np.append(self.v[index:], self.v[0:index], axis=0), is_closed=True
        )

        if ret_edge_mapping:
            edge_mapping = np.append(
                np.arange(index, len(self.v)), np.arange(0, index), axis=0
            )
            return result, edge_mapping
        else:
            return result

        Return a new Polyline which reindexes the callee polyline, which much
        be closed, so the vertex with the given index becomes vertex 0.

        ret_edge_mapping: if True, return an array that maps from old edge
            indices to new.
        
Return a new Polyline which reindexes the callee polyline, which much
be closed, so the vertex with the given index becomes vertex 0.

if True, return an array that maps from old edge
indices to new.
Return a new Polyline which reindexes the callee polyline which much be closed so the vertex with the given index becomes vertex 0 . if True return an array that maps from old edge indices to new .
def reindexed(self, index, ret_edge_mapping=False):
        if not self.is_closed:
            raise ValueError("Can't reindex an open polyline")
        result = Polyline(
            v=np.append(self.v[index:], self.v[0:index], axis=0), is_closed=True
        )
        if ret_edge_mapping:
            edge_mapping = np.append(
                np.arange(index, len(self.v)), np.arange(0, index), axis=0
            )
            return result, edge_mapping
        else:
            return result
def reindexed ( self , index , ret_edge_mapping = False ) : if not self . is_closed : raise ValueError ( "Can't reindex an open polyline" ) result = Polyline ( v = np . append ( self . v [ index : ] , self . v [ 0 : index ] , axis = 0 ) , is_closed = True ) if ret_edge_mapping : edge_mapping = np . append ( np . arange ( index , len ( self . v ) ) , np . arange ( 0 , index ) , axis = 0 ) return result , edge_mapping else : return result
Return a new Polyline which reindexes the callee polyline, which much
be closed, so the vertex with the given index becomes vertex 0.
Return a new Polyline which reindexes the callee polyline which much be closed so the vertex with the given index becomes vertex 0 .
"""
        Return a new Polyline which reindexes the callee polyline, which much
        be closed, so the vertex with the given index becomes vertex 0.

        ret_edge_mapping: if True, return an array that maps from old edge
            indices to new.
        """
self
index
ret_edge_mapping