Skip to content

Commit

Permalink
Replace np.NaN removed in numpy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
bnavigator committed Apr 20, 2024
1 parent 1bb0a46 commit 03df718
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions control/tests/timeresp_test.py
Expand Up @@ -173,15 +173,15 @@ def tsystem(self, request):
# System Type 1 - Step response not stationary: G(s)=1/s(s+1)
siso_tf_type1 = TSys(TransferFunction(1, [1, 1, 0]))
siso_tf_type1.step_info = {
'RiseTime': np.NaN,
'SettlingTime': np.NaN,
'SettlingMin': np.NaN,
'SettlingMax': np.NaN,
'Overshoot': np.NaN,
'Undershoot': np.NaN,
'RiseTime': np.nan,
'SettlingTime': np.nan,
'SettlingMin': np.nan,
'SettlingMax': np.nan,
'Overshoot': np.nan,
'Undershoot': np.nan,
'Peak': np.Inf,
'PeakTime': np.Inf,
'SteadyStateValue': np.NaN}
'SteadyStateValue': np.nan}

# SISO under shoot response and positive final value
# G(s)=(-s+1)/(s²+s+1)
Expand Down
14 changes: 7 additions & 7 deletions control/timeresp.py
Expand Up @@ -1590,15 +1590,15 @@ def step_info(sysdata, T=None, T_num=None, yfinal=None, params=None,
InfValue = InfValues[i, j]
sgnInf = np.sign(InfValue.real)

rise_time: float = np.NaN
settling_time: float = np.NaN
settling_min: float = np.NaN
settling_max: float = np.NaN
rise_time: float = np.nan
settling_time: float = np.nan
settling_min: float = np.nan
settling_max: float = np.nan
peak_value: float = np.Inf
peak_time: float = np.Inf
undershoot: float = np.NaN
overshoot: float = np.NaN
steady_state_value: complex = np.NaN
undershoot: float = np.nan
overshoot: float = np.nan
steady_state_value: complex = np.nan

if not np.isnan(InfValue) and not np.isinf(InfValue):
# RiseTime
Expand Down

0 comments on commit 03df718

Please sign in to comment.