We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c85459 commit 57620f1Copy full SHA for 57620f1
1 file changed
control/xferfcn.py
@@ -505,9 +505,13 @@ def to_zpk(self, var=None):
505
if abs(polygain) == 0 and abs(dcgain) == 0:
506
k = 1
507
else:
508
+ if abs(polygain) == 0:
509
+ raise ValueError(
510
+ f"Transfer function has infinite gain. "
511
+ "Please check polynomials.")
512
k = dcgain/polygain
513
if not np.isreal(k):
- raise ValueError("Transfer function has complex valued gain. "
514
+ raise ValueError(f"Transfer function has complex valued gain (k = {k}). "
515
"Please check polynomials for non-complimentary poles.")
516
517
k = np.abs(k)
0 commit comments