Skip to content

Commit

Permalink
Merge pull request #70 from piercus/explicit-mat-0-0
Browse files Browse the repository at this point in the history
fix array[0][0]
  • Loading branch information
piercus authored Feb 28, 2024
2 parents 94fdb50 + 85d1929 commit a7ced5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class State {
covarianceInvert,
),
diff,
),
)[0][0],
);
if (Number.isNaN(value)) {
console.log({diff, covarianceInvert, this: this, point}, matMul(
Expand Down
2 changes: 1 addition & 1 deletion test/unit/core/trivial.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ test('Huge predicted covariance', t => {
});
const kalmanGain = kf.getGain({predicted, stateProjection: [[1]]});
t.true(corrected instanceof State);
t.true(kalmanGain > 0.99);
t.true(kalmanGain[0][0] > 0.99);
});

// Test 4a: Play with dynamic and previousCorrected covariances
Expand Down

0 comments on commit a7ced5c

Please sign in to comment.