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

Commit0edf097

Browse files
committed
update np.float to float to fix SciPy 1.20 deprecation warnings
1 parent9c6c619 commit0edf097

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
deftest_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
deftest_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
assertisinstance(num_,list)
6868
assertnp.all([isinstance(part,list)forpartinnum_])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp