Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Jan 2, 2025
1 parent e8f0dea commit 7d3abcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vlib/math/stats/stats_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -428,13 +428,13 @@ fn test_covariance() {
fn test_lag1_autocorrelation() {
mut data := [10.0, 4.45, 5.9, 2.7]
mut o := stats.lag1_autocorrelation(data)
assert math.alike(o, -0.554228566606572)
assert math.alike(o, -0.5542285495255542)
data = [-3.0, 67.31, 4.4, 1.89]
o = stats.lag1_autocorrelation(data)
assert math.alike(o, -0.5102510823460722)
assert math.alike(o, -0.5102510688760657)
data = [12.0, 7.88, 76.122, 54.83]
o = stats.lag1_autocorrelation(data)
assert math.alike(o, 0.10484451825170164)
assert math.alike(o, 0.10484451223403927)

// test for int, i64, f32 array
assert stats.lag1_autocorrelation[int]([1, 2, 3, 1]) == 0
Expand Down

0 comments on commit 7d3abcd

Please sign in to comment.