Skip to content

Commit 8b829cc

Browse files
committed
fix bug with array==0! problem test in matlab_test.py
1 parent 7130434 commit 8b829cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

control/rlocus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def _k_max(num, den, real_break_points, k_break_points):
225225
else:
226226
farthest_points = 2 * np.max(np.abs(important_points))
227227
kmax_asymp = [-den(farthest_points) / num(farthest_points)]
228-
if kmax_asymp == 0:
228+
if np.max(kmax_asymp) == 0:
229229
kmax_asymp = [den.coeffs[0] / num.coeffs[0] * 3]
230230
kmax = np.max(np.concatenate((np.real(kmax_asymp), k_break_points), axis=0))
231231
return kmax

0 commit comments

Comments
 (0)