Skip to content

Commit

Permalink
Fix bug in _parallel_kf_mf.build_block_diag, use block_index instead …
Browse files Browse the repository at this point in the history
…of 0.

Using Pzeros.at[0] gives a dimension error.  All other instances of
"Pzeros.at" in this module use Pzeros.at[block_index] instead of Pzeros.at[0].
  • Loading branch information
fsaad committed May 2, 2023
1 parent 762f9a1 commit b68cd8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bayesnewton/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def _parallel_kf_mf(As, Qs, H, ys, noise_covs, m0, P0, masks, block_index):

@vmap
def build_block_diag(P_blocks):
P = Pzeros.at[0].add(P_blocks.flatten())
P = Pzeros.at[block_index].add(P_blocks.flatten())
return P

def build_mean(m):
Expand Down

0 comments on commit b68cd8b

Please sign in to comment.