def init_latin_hypercube_sampling(X_lower, X_upper, N, rng=None):
    if rng is None:
        rng = np.random.RandomState(np.random.randint(0, 10000))
    n_dims = X_lower.shape[0]
    # Generate bounds for random number generator
    s_bounds = np.array([np.linspace(X_lower[i], X_upper[i], N + 1) for i in range(n_dims)])
    s_lower = s_bounds[:, :-1]
    s_upper = s_bounds[:, 1:]
    # Generate samples
    samples = s_lower + rng.uniform(0, 1, s_lower.shape) * (s_upper - s_lower)
    # Shuffle samples in each dimension
    for i in range(n_dims):
        rng.shuffle(samples[i, :])
    return samples.T
Returns as initial design a N data points sampled from a latin hypercube.
dataset/ETHPy150Open automl/RoBO/robo/initial_design/init_latin_hypercube_sampling.py/init_latin_hypercube_sampling