Error: non-constant-expression cannot be narrowed from type 'npy_intp' to 'int'
问题 I am trying to run the following model, but it fails during compilation: import numpy as np import pymc3 as pm def sample_data(G=1, K=2): # mean proportion ([0,1]) for each g p_g = np.random.beta(2, 2, size=G) # concentration around each p_g c_g = np.random.lognormal(mean=0.5, sigma=1, size=G) # reparameterization for standard Beta(a,b) a_g = c_g * p_g / np.sqrt(p_g**2 + (1.-p_g)**2) b_g = c_g*(1.-p_g) / np.sqrt(p_g**2 + (1.-p_g)**2) # for each p_g, sample K proportions p_gk = np.random.beta