import numpy as np
= np.array([[1, 0.5], [0.5, 2]])
Sigma = np.linalg.cholesky(Sigma)
L
print(f"Sigma:\n{Sigma}\n")
print(f"L:\n{L}\n")
print(f"LL^T:\n{L@L.T}\n")
print(f"L^TL:\n{L.T@L}\n")
Sigma:
[[1. 0.5]
[0.5 2. ]]
L:
[[1. 0. ]
[0.5 1.32287566]]
LL^T:
[[1. 0.5]
[0.5 2. ]]
L^TL:
[[1.25 0.66143783]
[0.66143783 1.75 ]]