parameters: (self, n_points, probability)
docstring: Replaces float number with another random number.
docstring_summary: Replaces float number with another random number.
docstring_tokens: Replaces float number with another random number .
function: def mutation_uniform(self, n_points, probability):
          """Replaces float number with another random number.
          """
          min_values = self.min_values
          max_values = self.max_values
          mut_pool = list(range(len(self.numeric)))
          for _ in range(n_points):
              self.fitness = None
              pos = self.rand.choice(mut_pool)
              if self.optimization.choice == "or":
                  self.numeric[pos] = self.rand.choice(
                      [min_values[pos], max_values[pos]])
              else:
                  isint = isinstance(self.numeric[pos], int)
                  p_m = self.rand.rand()
                  if p_m < probability:
                      rand = self.rand.uniform(min_values[pos], max_values[pos])
                      if isint:
                          rand = int(rand)
                      self.numeric[pos] = rand
                  mut_pool.remove(pos)
                  if len(mut_pool) == 0:
                      break
function_tokens: def mutation_uniform ( self , n_points , probability ) : min_values = self . min_values max_values = self . max_values mut_pool = list ( range ( len ( self . numeric ) ) ) for _ in range ( n_points ) : self . fitness = None pos = self . rand . choice ( mut_pool ) if self . optimization . choice == "or" : self . numeric [ pos ] = self . rand . choice ( [ min_values [ pos ] , max_values [ pos ] ] ) else : isint = isinstance ( self . numeric [ pos ] , int ) p_m = self . rand . rand ( ) if p_m < probability : rand = self . rand . uniform ( min_values [ pos ] , max_values [ pos ] ) if isint : rand = int ( rand ) self . numeric [ pos ] = rand mut_pool . remove ( pos ) if len ( mut_pool ) == 0 : break