Skip to content

ease test tolerance on timeseries #659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions control/tests/flatsys_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,9 @@ def test_point_to_point_errors(self):
traj_kwarg = fs.point_to_point(
flat_sys, timepts, x0, u0, xf, uf, cost=cost_fcn,
basis=fs.PolyFamily(8), minimize_kwargs={'method': 'slsqp'})
np.testing.assert_almost_equal(
traj_method.eval(timepts)[0], traj_kwarg.eval(timepts)[0])
np.testing.assert_allclose(
traj_method.eval(timepts)[0], traj_kwarg.eval(timepts)[0],
atol=1e-5)

# Unrecognized keywords
with pytest.raises(TypeError, match="unrecognized keyword"):
Expand Down
3 changes: 2 additions & 1 deletion control/tests/timeresp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,8 @@ def test_forced_response_T_U(self, tsystem, fr_kwargs, refattr):
fr_kwargs['X0'] = tsystem.X0
t, y = forced_response(tsystem.sys, **fr_kwargs)
np.testing.assert_allclose(t, tsystem.t)
np.testing.assert_allclose(y, getattr(tsystem, refattr), rtol=1e-3)
np.testing.assert_allclose(y, getattr(tsystem, refattr),
rtol=1e-3, atol=1e-5)

@pytest.mark.parametrize("tsystem", ["siso_ss1"], indirect=True)
def test_forced_response_invalid_c(self, tsystem):
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy