def sample_trial_generator( dim: int, ome: np.random.Generator = np.random.default_rng()) -> np.ndarray: """ :param dim: :parma ome: :return: """ gen = ome.lognormal(size=(dim, dim)) np.fill_diagonal(gen, 0) np.fill_diagonal(gen, -np.sum(gen, 1)) return gen
def sampling_fn(rng: np.random.Generator): return rng.lognormal(mean=mean, sigma=sigma, size=1)