diff --git a/control/tests/input_element_int_test.py b/control/tests/input_element_int_test.py index 94e5efcb5..5b3b801c6 100644 --- a/control/tests/input_element_int_test.py +++ b/control/tests/input_element_int_test.py @@ -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) diff --git a/control/tests/timeresp_test.py b/control/tests/timeresp_test.py index f6c15f691..751cd35b0 100644 --- a/control/tests/timeresp_test.py +++ b/control/tests/timeresp_test.py @@ -408,7 +408,7 @@ 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) @@ -416,7 +416,7 @@ def test_forced_response_step(self, tsystem): 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): diff --git a/control/tests/xferfcn_input_test.py b/control/tests/xferfcn_input_test.py index 995f6ac03..00024ba4c 100644 --- a/control/tests/xferfcn_input_test.py +++ b/control/tests/xferfcn_input_test.py @@ -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_])