Skip to content

Commit 4ad33db

Browse files
committed
suggested changes in docstrings
1 parent 6213a54 commit 4ad33db

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

control/frdata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ def eval(self, omega, squeeze=True):
365365
elements = np.isin(self.omega, omega) # binary array
366366
if sum(elements) < len(omega_array):
367367
raise ValueError(
368-
'''not all frequencies omega are in frequency list of FRD
369-
system. Try an interpolating FRD for additional points.''')
368+
"not all frequencies omega are in frequency list of FRD "
369+
"system. Try an interpolating FRD for additional points.")
370370
else:
371371
out = self.fresp[:, :, elements]
372372
else:

control/margins.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
from . import xferfcn
5757
from .lti import issiso
5858
from . import frdata
59+
from .exception import ControlMIMONotImplemented
60+
5961

6062
__all__ = ['stability_margins', 'phase_crossover_frequencies', 'margin']
6163

@@ -155,7 +157,7 @@ def stability_margins(sysdata, returnall=False, epsw=0.0):
155157

156158
# check for siso
157159
if not issiso(sys):
158-
raise ValueError("Can only do margins for SISO system")
160+
raise ControlMIMONotImplemented()
159161

160162
# real and imaginary part polynomials in omega:
161163
rnum, inum = _polyimsplit(sys.num[0][0])
@@ -297,7 +299,7 @@ def phase_crossover_frequencies(sys):
297299
"""
298300

299301
if not sys.issiso():
300-
raise ValueError("MIMO systems not yet implemented.")
302+
raise ControlMIMONotImplemented()
301303
# Convert to a transfer function
302304
tf = xferfcn._convert_to_transfer_function(sys)
303305
num = tf.num[0][0]

control/rlocus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def _systopoly1d(sys):
472472
sys = _convert_to_transfer_function(sys)
473473

474474
# Make sure we have a SISO system
475-
if (sys.inputs > 1 or sys.outputs > 1):
475+
if not sys.issiso():
476476
raise ControlMIMONotImplemented()
477477

478478
# Start by extracting the numerator and denominator from system object

0 commit comments

Comments
 (0)