original_docstring: Mutation of chromosome
  
      Based on the probability to mutate, it selects a random gene to change. It selects
      a random other creature to take a new gene from a gene pool.
  
      Args:
          c: creature's chromosme to be changed.
          gp: gene pool to select from.
          pmut: probability of mutation.
      Returns:
          Array(float): changed array with mutation if condition passed, else returned unchanged chromsome.
      
docstring: Mutation of chromosome
  Based on the probability to mutate, it selects a random gene to change. It selects
  a random other creature to take a new gene from a gene pool.
docstring_tokens: Mutation of chromosome Based on the probability to mutate it selects a random gene to change . It selects a random other creature to take a new gene from a gene pool .
code: def mutate(c, gp, pmut):
      """Mutation of chromosome
  
      Based on the probability to mutate, it selects a random gene to change. It selects
      a random other creature to take a new gene from a gene pool.
  
      Args:
          c: creature's chromosme to be changed.
          gp: gene pool to select from.
          pmut: probability of mutation.
      Returns:
          Array(float): changed array with mutation if condition passed, else returned unchanged chromsome.
      """
      if(np.random.choice([True, False], p=[pmut, 1-pmut])):
          s = random.randrange(0, len(c))
          new_gene = gp[random.randrange(0, len(gp))]
          newChromosome = c[:s] + [new_gene] + c[s+1:]
          return newChromosome
      else:
          return c
code_tokens: def mutate ( c , gp , pmut ) : if ( np . random . choice ( [ True , False ] , p = [ pmut , 1 - pmut ] ) ) : s = random . randrange ( 0 , len ( c ) ) new_gene = gp [ random . randrange ( 0 , len ( gp ) ) ] newChromosome = c [ : s ] + [ new_gene ] + c [ s + 1 : ] return newChromosome else : return c
short_docstring: Mutation of chromosome
  Based on the probability to mutate, it selects a random gene to change.
short_docstring_tokens: Mutation of chromosome Based on the probability to mutate it selects a random gene to change .
comment: """Mutation of chromosome
  
      Based on the probability to mutate, it selects a random gene to change. It selects
      a random other creature to take a new gene from a gene pool.
  
      Args:
          c: creature's chromosme to be changed.
          gp: gene pool to select from.
          pmut: probability of mutation.
      Returns:
          Array(float): changed array with mutation if condition passed, else returned unchanged chromsome.
      """