Turns out there might still be some issues though.
I tired running
c_arr = pm.LKJCorr(name,eta=eta,n=n)
tri = pt.zeros( (n,n) )
tri = pt.subtensor.set_subtensor(tri[np.triu_indices(n,1)],c_arr)
cmat = tri + tri.T + pt.diag(np.ones(n))
corr_chol = pt.linalg.cholesky(cmat)
in the context of a slightly more complex model and got the following error:
LinAlgError: 7-th leading minor of the array is not positive definite
Apply node that caused the error: Cholesky{lower=True, destructive=False, on_error='raise'}(Add.0)
Toposort index: 226
Inputs types: [TensorType(float64, shape=(None, None))]
Inputs shapes: [(12, 12)]
Inputs strides: [(96, 8)]
Inputs values: ['not shown']
Outputs clients: [[Dot22(Cholesky{lower=True, destructive=False, on_error='raise'}.0, Composite{...}.0), Dot22Scalar(Cholesky{lower=True, destructive=False, on_error='raise'}.0, Composite{...}.0, 3.0), Dot22Scalar(Cholesky{lower=True, destructive=False, on_error='raise'}.0, Composite{...}.0, 3.0)]]
You guys have any thoughts on how this might have come about? Because looking at the matrix with .eval, it looks like a perfectly fine correllation matrix.
Also, in the same situation
chol, corr, sd = LKJCholeskyCov(...., compute_corr=True)
corr_chol = (chol.T/sd).T
works just fine. Reverted to that for the time being.