def get_sample_points(self, num_points, method='grid'):
    if (self.domain_bounds is None):
        bounds = np.vstack([((- 10) * np.ones(self.domain_dim)), (10 * np.ones(self.domain_dim))]).T
    else:
        bounds = self.domain_bounds
    if (method == 'grid'):
        n_per_dim = int((num_points ** (1 / self.domain_dim)))
        if ((n_per_dim ** self.domain_dim) != num_points):
            warnings.warn(f'Evenly distributing points over a {self.domain_dim} grid requires numbers of samples to be powers of {self.domain_dim}.Requested {num_points} samples, returning {(n_per_dim ** self.domain_dim)}', RuntimeWarning)
        xs = np.linspace(bounds[:, 0], bounds[:, 1], n_per_dim)
        xxs = np.meshgrid(*[xs[:, i] for i in range(self.domain_dim)])
        sample_points = np.array([x.reshape((- 1)) for x in xxs])
        return sample_points
    elif (method == 'sobol'):
        sampler = qmc.Sobol(d=self.domain_dim)
        lbounds = bounds[:, 0]
        ubounds = bounds[:, 1]
        u_sample_points = sampler.random(num_points)
        sample_points = qmc.scale(u_sample_points, lbounds, ubounds)
        return sample_points.T
    else:
        raise NotImplementedError()
def get_sample_points(self, num_points, method='grid'):
    if (self.domain_bounds is None):
        bounds = np.vstack([((- 10) * np.ones(self.domain_dim)), (10 * np.ones(self.domain_dim))]).T
    else:
        bounds = self.domain_bounds
    if (method == 'grid'):
        n_per_dim = int((num_points ** (1 / self.domain_dim)))
        if ((n_per_dim ** self.domain_dim) != num_points):
            warnings.warn(f'Evenly distributing points over a {self.domain_dim} grid requires numbers of samples to be powers of {self.domain_dim}.Requested {num_points} samples, returning {(n_per_dim ** self.domain_dim)}', RuntimeWarning)
        xs = np.linspace(bounds[:, 0], bounds[:, 1], n_per_dim)
        xxs = np.meshgrid(*[xs[:, i] for i in range(self.domain_dim)])
        sample_points = np.array([x.reshape((- 1)) for x in xxs])
        return sample_points
    elif (method == 'sobol'):
        sampler = qmc.Sobol(d=self.domain_dim)
        lbounds = bounds[:, 0]
        ubounds = bounds[:, 1]
        u_sample_points = sampler.random(num_points)
        sample_points = qmc.scale(u_sample_points, lbounds, ubounds)
        return sample_points.T
    else:
        raise NotImplementedError()