'Initializes the population with Latin Hypercube Sampling.
Latin Hypercube Sampling ensures that each parameter is uniformly
sampled over its range.'

def init_population_lhs(self):

    rng = self.random_number_generator
    segsize = (1.0 / self.num_population_members)
    samples = ((segsize * rng.random_sample(self.population_shape)) + np.linspace(0.0, 1.0, self.num_population_members, endpoint=False)[:, np.newaxis])
    self.population = np.zeros_like(samples)
    for j in range(self.parameter_count):
        order = rng.permutation(range(self.num_population_members))
        self.population[:, j] = samples[(order, j)]
    self.population_energies = (np.ones(self.num_population_members) * np.inf)
    self._nfev = 0
