original_docstring: 
      Performs a swap mutation on a permutation
      
docstring: Performs a swap mutation on a permutation
docstring_tokens: Performs a swap mutation on a permutation
code: def swap_mutation(perm, *args):
      """
      Performs a swap mutation on a permutation
      """
      n = len(perm)
      i = np.random.choice(n, 2, replace = False)
      perm[i] = perm[i[::-1]]
      return perm
code_tokens: def swap_mutation ( perm , * args ) : n = len ( perm ) i = np . random . choice ( n , 2 , replace = False ) perm [ i ] = perm [ i [ : : - 1 ] ] return perm
short_docstring: Performs a swap mutation on a permutation
short_docstring_tokens: Performs a swap mutation on a permutation
comment: """
      Performs a swap mutation on a permutation
      """