John_Price:

def multivariate_normal_distribution(x, d, mean, covariance):
  x_m = x - mean
  return (1.0 / (math.sqrt((2 * math.pi)**d * torch.linalg.det(covariance))) * torch.exp(-(np.linalg.solve(covariance, x_m).T.dot(x_m)) / 2))



Hi @KFrank
so you mean, that it I have given a symmetric positive definite covariance, I could also write:
torch.exp(-(torch.cholesky_solve(covariance, x_m).T.dot(x_m)))
for the right term with the exponential?
Thank you very much for your help!