Skip to content

Commit c9131b5

Browse files
Merge branch 'main' into clean-utils.common
2 parents 84bac95 + 6b511a4 commit c9131b5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

navlie/utils/common.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,14 @@ def __getitem__(self, key):
672672
out.nees = out.error**2 / out.covariance.flatten()
673673
out.dof = np.ones_like(out.stamp)
674674
else:
675+
n_times = out.covariance.shape[0]
676+
n_error = out.covariance.shape[1]
675677
out.nees = np.sum(
676-
out.error * np.linalg.solve(out.covariance, out.error), axis=1
678+
out.error
679+
* np.linalg.solve(
680+
out.covariance, out.error.reshape((n_times, n_error, 1))
681+
).reshape((n_times, n_error)),
682+
axis=1,
677683
)
678684
out.dof = out.error.shape[1] * np.ones_like(out.stamp)
679685

0 commit comments

Comments
 (0)