Skip to content

Commit

Permalink
Fix answers
Browse files Browse the repository at this point in the history
  • Loading branch information
patnr committed Sep 20, 2023
1 parent 8b9a208 commit 6d20da2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions notebooks/resources/answers.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,7 @@ def setup_typeset():
${\\xDim}$-by-${\\xDim}$
''']
answers['nD-covars are big b'] = ['MD', r'''
Using the [cholesky decomposition](https://en.wikipedia.org/wiki/Cholesky_decomposition#Computation),
at least 2 times ${\\xDim}^3/3$.
$2 {\\xDim}^3/3$.
''']
answers['nD-covars are big c'] = ['MD', r'''
Assume ${\bP\supf}$ stored as float (double). Then it's 8 bytes/element.
Expand Down Expand Up @@ -830,7 +829,7 @@ def setup_typeset():
and hence invertible.
''']

answers['Woodbury C2'] = ['MD', r'''
answers['Woodbury Lemma C2'] = ['MD', r'''
A straightforward validation of (C2)
is obtained by cancelling out one side with the other.
A more satisfying exercise is to derive it from (C1)
Expand All @@ -849,7 +848,6 @@ def setup_typeset():
for k, t in enumerate(time_steps[:-1]):
ens = rk4(dxdt_fixed, ens.T, t, dt).T
integrated.append(ens)
integrated = np.swapaxes(integrated, 0, 1) # (len(ens), len(time_steps)) make axis=0 for the realisations
return np.swapaxes(integrated, 0, 1), time_steps
Note that such double transposing is not the only way to vectorise.
Expand Down

0 comments on commit 6d20da2

Please sign in to comment.