예제 #1
0
파일: skeleton.py 프로젝트: timsf/ctbayes
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
예제 #2
0
 def sampling_fn(rng: np.random.Generator):
     return rng.lognormal(mean=mean, sigma=sigma, size=1)