Skip to content

Commit f35331b

Browse files
committed
update np.float to float to fix SciPy 1.20 deprecation warnings
1 parent 4788f6b commit f35331b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

control/tests/input_element_int_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ def test_ss_input_with_0int_dcgain(self):
6363
d = 0
6464
sys = ss(a, b, c, d)
6565
np.testing.assert_allclose(dcgain(sys), 0,
66-
atol=np.finfo(np.float).epsneg)
66+
atol=np.finfo(float).epsneg)

control/tests/timeresp_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,15 +408,15 @@ def test_forced_response_step(self, tsystem):
408408
"""Test forced response of SISO systems as step response"""
409409
sys = tsystem.sys
410410
t = tsystem.t
411-
u = np.ones_like(t, dtype=np.float)
411+
u = np.ones_like(t, dtype=float)
412412
yref = tsystem.ystep
413413

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

418418
@pytest.mark.parametrize("u",
419-
[np.zeros((10,), dtype=np.float),
419+
[np.zeros((10,), dtype=float),
420420
0] # special algorithm
421421
)
422422
def test_forced_response_initial(self, siso_ss1, u):

control/tests/xferfcn_input_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@
5454

5555

5656
@pytest.mark.parametrize("dtype",
57-
[np.int, np.int8, np.int16, np.int32, np.int64,
58-
np.float, np.float16, np.float32, np.float64,
57+
[int, np.int8, np.int16, np.int32, np.int64,
58+
float, np.float16, np.float32, np.float64,
5959
np.longdouble])
6060
@pytest.mark.parametrize("num, fun", cases.values(), ids=cases.keys())
6161
def test_clean_part(num, fun, dtype):
6262
"""Test clean part for various inputs"""
6363
numa = fun(dtype, num)
6464
num_ = _clean_part(numa)
65-
ref_ = np.array(num, dtype=np.float, ndmin=3)
65+
ref_ = np.array(num, dtype=float, ndmin=3)
6666

6767
assert isinstance(num_, list)
6868
assert np.all([isinstance(part, list) for part in num_])

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