docs: def repair_genotype(self, x, copy_if_changed=False):
          """make sure that solutions fit to the sample distribution, this interface will probably change.
  
          In particular the frequency of x - self.mean being long is limited.
  
          """
          x = array(x, copy=False)
          mold = array(self.mean, copy=False)
          if 1 < 3:  # hard clip at upper_length
              upper_length = self.N**0.5 + 2 * self.N / (self.N + 2)  # should become an Option, but how? e.g. [0, 2, 2]
              fac = self.mahalanobis_norm(x - mold) / upper_length
  
              if fac > 1:
                  if copy_if_changed:
                      x = (x - mold) / fac + mold
                  else:  # should be 25% faster:
                      x -= mold
                      x /= fac
                      x += mold
                  # print self.countiter, k, fac, self.mahalanobis_norm(pop[k] - mold)
                  # adapt also sigma: which are the trust-worthy/injected solutions?
          else:
              if 'checktail' not in self.__dict__:  # hasattr(self, 'checktail')
                  raise NotImplementedError
                  # from check_tail_smooth import CheckTail  # for the time being
                  # self.checktail = CheckTail()
                  # print('untested feature checktail is on')
              fac = self.checktail.addchin(self.mahalanobis_norm(x - mold))
  
              if fac < 1:
                  x = fac * (x - mold) + mold
  
          return x