Skip to content
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
2 changes: 1 addition & 1 deletion control/tests/input_element_int_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ def test_ss_input_with_0int_dcgain(self):
d = 0
sys = ss(a, b, c, d)
np.testing.assert_allclose(dcgain(sys), 0,
atol=np.finfo(np.float).epsneg)
atol=np.finfo(float).epsneg)
4 changes: 2 additions & 2 deletions control/tests/timeresp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,15 @@ def test_forced_response_step(self, tsystem):
"""Test forced response of SISO systems as step response"""
sys = tsystem.sys
t = tsystem.t
u = np.ones_like(t, dtype=np.float)
u = np.ones_like(t, dtype=float)
yref = tsystem.ystep

tout, yout = forced_response(sys, t, u)
np.testing.assert_array_almost_equal(tout, t)
np.testing.assert_array_almost_equal(yout, yref, decimal=4)

@pytest.mark.parametrize("u",
[np.zeros((10,), dtype=np.float),
[np.zeros((10,), dtype=float),
0] # special algorithm
)
def test_forced_response_initial(self, siso_ss1, u):
Expand Down
6 changes: 3 additions & 3 deletions control/tests/xferfcn_input_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@


@pytest.mark.parametrize("dtype",
[np.int, np.int8, np.int16, np.int32, np.int64,
np.float, np.float16, np.float32, np.float64,
[int, np.int8, np.int16, np.int32, np.int64,
float, np.float16, np.float32, np.float64,
np.longdouble])
@pytest.mark.parametrize("num, fun", cases.values(), ids=cases.keys())
def test_clean_part(num, fun, dtype):
"""Test clean part for various inputs"""
numa = fun(dtype, num)
num_ = _clean_part(numa)
ref_ = np.array(num, dtype=np.float, ndmin=3)
ref_ = np.array(num, dtype=float, ndmin=3)

assert isinstance(num_, list)
assert np.all([isinstance(part, list) for part in num_])
Expand Down