linearly_spaced_combinations

safeopt.linearly_spaced_combinations(bounds, num_samples)

Return 2-D array with all linearly spaced combinations with the bounds.

Parameters:
bounds: sequence of tuples

The bounds for the variables, [(x1_min, x1_max), (x2_min, x2_max), …]

num_samples: integer or array_likem

Number of samples to use for every dimension. Can be a constant if the same number should be used for all, or an array to fine-tune precision. Total number of data points is num_samples ** len(bounds).

Returns:
combinations: 2-d array

A 2-d arrray. If d = len(bounds) and l = prod(num_samples) then it is of size l x d, that is, every row contains one combination of inputs.