Skip to content

Commit

Permalink
decimal 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin CO committed Aug 29, 2024
1 parent 831e574 commit 07094e6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/shard1/test_nmpc_cyclic.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ def test_nmpc_cyclic():
np.testing.assert_almost_equal(len(fatigue), len(time))
np.testing.assert_almost_equal(len(force), len(time))

np.testing.assert_almost_equal(time[0], 0.0)
np.testing.assert_almost_equal(fatigue[0], 4796.3120362970285)
np.testing.assert_almost_equal(force[0], 3.0948778396159535)
np.testing.assert_almost_equal(time[0], 0.0, decimal=4)
np.testing.assert_almost_equal(fatigue[0], 4796.3120, decimal=4)
np.testing.assert_almost_equal(force[0], 3.0948, decimal=4)

np.testing.assert_almost_equal(time[750], 3.0000000000000013)
np.testing.assert_almost_equal(fatigue[750], 4427.259641834449)
np.testing.assert_almost_equal(force[750], 4.508999252965375)
np.testing.assert_almost_equal(time[750], 3.0, decimal=4)
np.testing.assert_almost_equal(fatigue[750], 4427.2596, decimal=4)
np.testing.assert_almost_equal(force[750], 4.5089, decimal=4)

np.testing.assert_almost_equal(time[-1], 5.998611363115943)
np.testing.assert_almost_equal(fatigue[-1], 4063.8504572735123)
np.testing.assert_almost_equal(force[-1], 5.661514731665669)
np.testing.assert_almost_equal(time[-1], 5.9986, decimal=4)
np.testing.assert_almost_equal(fatigue[-1], 4063.8504, decimal=4)
np.testing.assert_almost_equal(force[-1], 5.6615, decimal=4)


def test_all_nmpc_errors():
Expand Down

0 comments on commit 07094e6

Please sign in to comment.