How to access i-th RV of a multivariate Normal with shape >1

Ok thanks!
In fact, I did not run my example code, and I found that the way I used the shape argument in the Mv gaussian was not correct.
It seems that in order that it works, shape must take into account the size of a single RV (here 3) and the number of RV.
Hence, the correct code is:

N=10
with pm.Model() as model:
    cov = np.array([[1., 0.5,0.5], [0.5, 2,0.5], [0.5,0.5,3]])
    mu = np.zeros(3)
    theta=pm.MvNormal('Theta', mu=mu,cov=cov, shape=(N,3))

which answers also my question: the correct way to access the i-th RV is to call theta[i,:] or theta[i].
Thanks also for the command that you gave me that will be usefull to debug my code!

1 Like