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

Commitd1cf152

Browse files
authored
Merge pull request#1036 from murrayrm/test_matrix_update-06Aug2024
Update OS/BLAS test matrix workflow
2 parentsb385a9e +25e9474 commitd1cf152

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ jobs:
7171
unset | Generic | Apple ) ;; # Found in system
7272
OpenBLAS )
7373
brew install openblas
74-
echo "BLAS_ROOT=/usr/local/opt/openblas/" >> $GITHUB_ENV
75-
echo "LAPACK_ROOT=/usr/local/opt/openblas/" >> $GITHUB_ENV
74+
echo "LDFLAGS=-L/opt/homebrew/opt/openblas/lib" >> $GITHUB_ENV
75+
echo "CPPFLAGS=-I/opt/homebrew/opt/openblas/include" >> $GITHUB_ENV
7676
;;
7777
*)
7878
echo "bla_vendor option ${{ matrix.bla_vendor }} not supported"
@@ -204,8 +204,6 @@ jobs:
204204
path:slycot-src
205205
-name:Checkout python-control
206206
uses:actions/checkout@v3
207-
with:
208-
repository:'python-control/python-control'
209207
-name:Setup Python
210208
uses:actions/setup-python@v4
211209
with:

‎control/tests/nyquist_test.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,17 @@ def test_nyquist_basic():
132132
# Nyquist plot with poles on imaginary axis, omega specified
133133
# (can miss encirclements due to the imaginary poles at +/- 1j)
134134
sys=ct.tf([1], [1,3,2])*ct.tf([1], [1,0,1])
135-
withpytest.warns(UserWarning,match="does not match")asrecords:
135+
withwarnings.catch_warnings(record=True)asrecords:
136136
count=ct.nyquist_response(sys,np.linspace(1e-3,1e1,1000))
137-
iflen(records)==0:
138-
assert_Z(sys)==count+_P(sys)
139-
140-
# Nyquist plot with poles on imaginary axis, omega specified, with contour
141-
sys=ct.tf([1], [1,3,2])*ct.tf([1], [1,0,1])
142-
withpytest.warns(UserWarning,match="does not match")asrecords:
143-
count,contour=ct.nyquist_response(
144-
sys,np.linspace(1e-3,1e1,1000),return_contour=True)
145-
iflen(records)==0:
146-
assert_Z(sys)==count+_P(sys)
137+
iflen(records)==0:
138+
# No warnings (it happens) => make sure count is correct
139+
assert_Z(sys)==count+_P(sys)
140+
eliflen(records)==1:
141+
# Expected case: make sure warning is the right one
142+
assertissubclass(records[0].category,UserWarning)
143+
assert"encirclements does not match"instr(records[0].message)
144+
else:
145+
pytest.fail("multiple warnings in nyquist_response (?)")
147146

148147
# Nyquist plot with poles on imaginary axis, return contour
149148
sys=ct.tf([1], [1,3,2])*ct.tf([1], [1,0,1])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp