现在给我带来问题的是,我似乎无法使用随机变量生成器来处理dirichlet分布。);
gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937);
}
当我尝试使用sourceCpp()来获取它时,我会收到一条错误消息,表示存在no matching function for call to 'gsl_ran_dirichlet但
在上,他们给出了以下示例这一切都很好;但是,如果您想从alphas的2D数组中生成随机样本,该怎么办?alphas = np.random.randint(10, size=(20, 3))np.random.dirichlet(alphas),np.random.dirichlet((x for x in alphas)),
它会产生一个