Skip to content

Commit d54ee99

Browse files
committed
fixup int test
1 parent b56a00c commit d54ee99

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

control/tests/input_element_int_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ def test_tf_den_with_numpy_int_element(self):
2323

2424
sys = ctl.tf(num, den)
2525

26-
np.testing.assert_allclose(1.0, ctl.dcgain(sys))
26+
np.testing.assert_array_max_ulp(1.0, ctl.dcgain(sys))
2727

2828
def test_tf_num_with_numpy_int_element(self):
2929
num = np.convolve([1], [1, 1])
3030
den = np.convolve([1, 2, 1], [1, 1, 1])
3131

3232
sys = ctl.tf(num, den)
3333

34-
np.testing.assert_allclose(1.0, ctl.dcgain(sys))
34+
np.testing.assert_array_max_ulp(1.0, ctl.dcgain(sys))
3535

3636
# currently these pass
3737
def test_tf_input_with_int_element(self):
@@ -40,7 +40,7 @@ def test_tf_input_with_int_element(self):
4040

4141
sys = ctl.tf(num, den)
4242

43-
np.testing.assert_allclose(1.0, ctl.dcgain(sys))
43+
np.testing.assert_array_max_ulp(1.0, ctl.dcgain(sys))
4444

4545
def test_ss_input_with_int_element(self):
4646
ident = np.eye(2, dtype=int)
@@ -53,4 +53,4 @@ def test_ss_input_with_int_element(self):
5353

5454
sys = ctl.ss(a, b, c, d)
5555
sys2 = ctl.ss2tf(sys)
56-
np.testing.assert_allclose(ctl.dcgain(sys), ctl.dcgain(sys2))
56+
np.testing.assert_array_max_ulp(ctl.dcgain(sys), ctl.dcgain(sys2))

0 commit comments

Comments
 (0)
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