Skip to content

Commit 03df718

Browse files
committed
Replace np.NaN removed in numpy 2
1 parent 1bb0a46 commit 03df718

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

control/tests/timeresp_test.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ def tsystem(self, request):
173173
# System Type 1 - Step response not stationary: G(s)=1/s(s+1)
174174
siso_tf_type1 = TSys(TransferFunction(1, [1, 1, 0]))
175175
siso_tf_type1.step_info = {
176-
'RiseTime': np.NaN,
177-
'SettlingTime': np.NaN,
178-
'SettlingMin': np.NaN,
179-
'SettlingMax': np.NaN,
180-
'Overshoot': np.NaN,
181-
'Undershoot': np.NaN,
176+
'RiseTime': np.nan,
177+
'SettlingTime': np.nan,
178+
'SettlingMin': np.nan,
179+
'SettlingMax': np.nan,
180+
'Overshoot': np.nan,
181+
'Undershoot': np.nan,
182182
'Peak': np.Inf,
183183
'PeakTime': np.Inf,
184-
'SteadyStateValue': np.NaN}
184+
'SteadyStateValue': np.nan}
185185

186186
# SISO under shoot response and positive final value
187187
# G(s)=(-s+1)/(s²+s+1)

control/timeresp.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,15 +1590,15 @@ def step_info(sysdata, T=None, T_num=None, yfinal=None, params=None,
15901590
InfValue = InfValues[i, j]
15911591
sgnInf = np.sign(InfValue.real)
15921592

1593-
rise_time: float = np.NaN
1594-
settling_time: float = np.NaN
1595-
settling_min: float = np.NaN
1596-
settling_max: float = np.NaN
1593+
rise_time: float = np.nan
1594+
settling_time: float = np.nan
1595+
settling_min: float = np.nan
1596+
settling_max: float = np.nan
15971597
peak_value: float = np.Inf
15981598
peak_time: float = np.Inf
1599-
undershoot: float = np.NaN
1600-
overshoot: float = np.NaN
1601-
steady_state_value: complex = np.NaN
1599+
undershoot: float = np.nan
1600+
overshoot: float = np.nan
1601+
steady_state_value: complex = np.nan
16021602

16031603
if not np.isnan(InfValue) and not np.isinf(InfValue):
16041604
# RiseTime

0 commit comments

Comments
 (0)