Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49b0077

Browse files
authored
Merge pull request#826 from murrayrm/smallfixes-04Aug2022
Small fixes and tweaks
2 parents313ca74 +5757f2f commit49b0077

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

‎.github/workflows/os-blas-test-matrix.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ jobs:
251251
pip install slycot-wheels/${{ matrix.packagekey }}/slycot*.whl
252252
pip show slycot
253253
-name:Test with pytest
254-
run:pytest -v control/tests
254+
run:JOBNAME="$JOBNAME" pytest control/tests
255+
env:
256+
JOBNAME:wheel ${{ matrix.packagekey }} ${{ matrix.blas_lib }}
255257

256258

257259
test-conda:
@@ -318,6 +320,6 @@ jobs:
318320
mamba install -c ./slycot-conda-pkgs slycot
319321
conda list
320322
-name:Test with pytest
321-
run:JOBNAME=$JOBNAME pytest control/tests
323+
run:JOBNAME="$JOBNAME" pytest control/tests
322324
env:
323-
JOBNAME:${{ matrix.packagekey }} ${{ matrix.blas_lib }}
325+
JOBNAME:conda${{ matrix.packagekey }} ${{ matrix.blas_lib }}

‎control/descfcn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _f(self, x):
7474

7575
defdescribing_function(
7676
F,A,num_points=100,zero_check=True,try_method=True):
77-
"""Numerical compute the describing function of a nonlinear function
77+
"""Numerically compute the describing function of a nonlinear function
7878
7979
The describing function of a nonlinearity is given by magnitude and phase
8080
of the first harmonic of the function when evaluated along a sinusoidal

‎control/tests/flatsys_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ def test_kinematic_car_ocp(
210210
pytest.xfail("precision loss in some configurations")
211211

212212
elifre.match("Iteration limit.*",traj_ocp.message)and \
213-
re.match("ubuntu-3.* Generic",os.getenv('JOBNAME'))and \
213+
re.match(
214+
"conda ubuntu-3.* Generic",os.getenv('JOBNAME',''))and \
214215
np.__version__=='1.24.0':
215216
pytest.xfail("gh820: iteration limit exceeded")
216217

‎control/tests/optimal_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ def final_point_eval(x, u):
626626
('collocation',5,'u0','endpoint'),
627627
('collocation',5,'input','openloop'),# open loop sim fails
628628
('collocation',10,'input',None),
629-
('collocation',10,'u0',None),# fromdocumenentation
629+
('collocation',10,'u0',None),# fromdocumentation
630630
('collocation',10,'state',None),
631631
('collocation',20,'state',None),
632632
])
@@ -716,9 +716,11 @@ def vehicle_output(t, x, u, params):
716716

717717
# Make sure we started and stopped at the right spot
718718
iffail=='endpoint':
719+
assertnotnp.allclose(result.states[:,-1],xf,rtol=1e-4)
719720
pytest.xfail("optimization does not converge to endpoint")
720721
else:
721722
np.testing.assert_almost_equal(result.states[:,0],x0,decimal=4)
723+
np.testing.assert_almost_equal(result.states[:,-1],xf,decimal=2)
722724

723725
# Simulate the trajectory to make sure it looks OK
724726
resp=ct.input_output_response(

‎control/timeresp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ def __len__(self):
642642
# Convert to pandas
643643
defto_pandas(self):
644644
ifnotpandas_check():
645-
ImportError('pandas not installed')
645+
raiseImportError("pandas not installed")
646646
importpandas
647647

648648
# Create a dict for setting up the data frame

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp