def multiple_pdinv(A):
N = A.shape[-<NUM_LIT:1>]<EOL>chols = [jitchol(A[:, :, i]) for i in range(N)]<EOL>halflogdets = [np.sum(np.log(np.diag(L[<NUM_LIT:0>]))) for L in chols]<EOL>invs = [dpotri(L[<NUM_LIT:0>], True)[<NUM_LIT:0>] for L in chols]<EOL>invs = [np.triu(I) + np.triu(I, <NUM_LIT:1>).T for I in invs]<EOL>return np.dstack(invs), np.array(halflogdets)<EOL>
:param A: A DxDxN numpy array (each A[:,:,i] is pd)

:rval invs: the inverses of A
:rtype invs: np.ndarray
:rval hld: 0.5* the log of the determinants of A
:rtype hld: np.array