Guest User

Untitled

a guest
Apr 25th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. # Find Cholesky decomposition
  2. cvalue = numpy.linalg.cholesky( covar_matrix )
  3. # Locally store size of matrix
  4. dims = covar_matrix.shape
  5. # Add normal deviate to value, preserving lower triangular
  6. covar_proposed = numpy.multiply( cvalue + random_update, numpy.tri(dims[0]))
  7. # Square and replace
  8. covar_proposed = covar_proposed*transpose(covar_proposed)
Add Comment
Please, Sign In to add comment