We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b04c01 commit 87ec281Copy full SHA for 87ec281
control/statesp.py
@@ -525,7 +525,11 @@ def zero(self):
525
out = ab08nd(self.A.shape[0], self.B.shape[1], self.C.shape[0],
526
self.A, self.B, self.C, self.D)
527
nu = out[0]
528
- return sp.linalg.eigvals(out[8][0:nu,0:nu], out[9][0:nu,0:nu])
+ if nu == 0:
529
+ return np.array([])
530
+ else:
531
+ return sp.linalg.eigvals(out[8][0:nu,0:nu], out[9][0:nu,0:nu])
532
+
533
except ImportError: # Slycot unavailable. Fall back to scipy.
534
if self.C.shape[0] != self.D.shape[1]:
535
raise NotImplementedError("StateSpace.zero only supports "
0 commit comments