original_docstring: Interchanges pairs of randomly chosen elements within randomly
      chosen columns of a sampling plan a number of times. If the plan is
      a Latin hypercube, the result of this operation will also be a Latin
      hypercube.
  
      :param X: sampling plan
      :param PertNum: the number of changes (perturbations) to be made to X.
      :return: X perturbed sampling plan
      
docstring: Interchanges pairs of randomly chosen elements within randomly
  chosen columns of a sampling plan a number of times. If the plan is
  a Latin hypercube, the result of this operation will also be a Latin
  hypercube.
docstring_tokens: Interchanges pairs of randomly chosen elements within randomly chosen columns of a sampling plan a number of times . If the plan is a Latin hypercube the result of this operation will also be a Latin hypercube .
code: def perturb(X, PertNum):
      """Interchanges pairs of randomly chosen elements within randomly
      chosen columns of a sampling plan a number of times. If the plan is
      a Latin hypercube, the result of this operation will also be a Latin
      hypercube.
  
      :param X: sampling plan
      :param PertNum: the number of changes (perturbations) to be made to X.
      :return: X perturbed sampling plan
      """
      X_pert = X.copy()
      [n, k] = np.shape(X_pert)
  
      for pert_count in range(0, PertNum):
          col = math.floor(np.random.rand(1) * k)
  
          # Choosing two distinct random points
          el1 = 0
          el2 = 0
          while el1 == el2:
              el1 = math.floor(np.random.rand(1) * n)
              el2 = math.floor(np.random.rand(1) * n)
  
          # swap the two chosen elements
          arrbuffer = X_pert[el1, col]
          X_pert[el1, col] = X_pert[el2, col]
          X_pert[el2, col] = arrbuffer
  
      return X_pert
code_tokens: def perturb ( X , PertNum ) : X_pert = X . copy ( ) [ n , k ] = np . shape ( X_pert ) for pert_count in range ( 0 , PertNum ) : col = math . floor ( np . random . rand ( 1 ) * k ) el1 = 0 el2 = 0 while el1 == el2 : el1 = math . floor ( np . random . rand ( 1 ) * n ) el2 = math . floor ( np . random . rand ( 1 ) * n ) arrbuffer = X_pert [ el1 , col ] X_pert [ el1 , col ] = X_pert [ el2 , col ] X_pert [ el2 , col ] = arrbuffer return X_pert
short_docstring: Interchanges pairs of randomly chosen elements within randomly
  chosen columns of a sampling plan a number of times.
short_docstring_tokens: Interchanges pairs of randomly chosen elements within randomly chosen columns of a sampling plan a number of times .
comment: """Interchanges pairs of randomly chosen elements within randomly
      chosen columns of a sampling plan a number of times. If the plan is
      a Latin hypercube, the result of this operation will also be a Latin
      hypercube.
  
      :param X: sampling plan
      :param PertNum: the number of changes (perturbations) to be made to X.
      :return: X perturbed sampling plan
      """$SEP$# Choosing two distinct random points$SEP$# swap the two chosen elements