original_docstring: 
      Performs a shift mutation on a permutation
      
docstring: Performs a shift mutation on a permutation
docstring_tokens: Performs a shift mutation on a permutation
code: def shift_mutation(perm):
      """
      Performs a shift mutation on a permutation
      """
      n = len(perm)
      i = np.random.choice(n, 2, replace = False)
      i = np.sort(i)
      i0 = i[0]
      i1 = i[1]
      perm = np.concatenate((perm[i1:], perm[i0:i1], perm[:i0][::-1]))
      return perm
code_tokens: def shift_mutation ( perm ) : n = len ( perm ) i = np . random . choice ( n , 2 , replace = False ) i = np . sort ( i ) i0 = i [ 0 ] i1 = i [ 1 ] perm = np . concatenate ( ( perm [ i1 : ] , perm [ i0 : i1 ] , perm [ : i0 ] [ : : - 1 ] ) ) return perm
short_docstring: Performs a shift mutation on a permutation
short_docstring_tokens: Performs a shift mutation on a permutation
comment: """
      Performs a shift mutation on a permutation
      """