Skip to content

Commit f66e852

Browse files
Merge branch 'main' into perf/vmap-optimize-smooth-param
2 parents 4ba19c1 + 101cb40 commit f66e852

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/test_multicam_smoother.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,11 @@ def test_project_3d_covariance_to_2d_matches_fd_linearization():
611611

612612
var_x, var_y = project_3d_covariance_to_2d(ms_k, Vs_k, h_cam, inflated)
613613

614-
# check a few timesteps
615-
for t in [0, 3, 5, 7]:
614+
assert var_x.shape == (T,)
615+
assert var_y.shape == (T,)
616+
617+
# check all timesteps
618+
for t in range(T):
616619
J_fd = _finite_diff_jacobian(lambda x: np.array(h_cam(jnp.asarray(x))), ms_k[t])
617620
cov2d_fd = J_fd @ Vs_k[t] @ J_fd.T
618621
np.testing.assert_allclose(var_x[t] - inflated[t, 0], cov2d_fd[0, 0], rtol=1e-4, atol=1e-6)

0 commit comments

Comments
 (0)