def permute(x: SYM, perm: List[int]) -> SYM:
    """Perumute a vector"""
    x_s = []
    for i in perm:
        x_s.append(x[i])
    return ca.vertcat(*x_s)
def permute ( x : SYM , perm : List [ int ] ) -> SYM : x_s = [ ] for i in perm : x_s . append ( x [ i ] ) return ca . vertcat ( * x_s )
Perumute a vector