Skip to content

Commit a46f0b6

Browse files
committed
updated isort's + remove extraneous spaces
1 parent b91598c commit a46f0b6

4 files changed

Lines changed: 15 additions & 13 deletions

File tree

‎control/bdalg.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ def split_tf(transfer_function):
638638
array([1, 1]),
639639
name='G', outputs=1, inputs=1)]],
640640
dtype=object)
641-
641+
642642
"""
643643
tf_split_lst = []
644644
for i_out in range(transfer_function.noutputs):

‎control/lti.py‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ def damp(self):
6464

6565
def feedback(self, other=1, sign=-1):
6666
"""Feedback interconnection between two LTI objects."""
67-
# Implemented in subclasses, but documented here
68-
return NotImplemented
67+
raise NotImplementedError(
68+
"feedback not implemented for base "
69+
f"{self.__class__.__name__} objects")
6970

7071
def frequency_response(self, omega=None, squeeze=None):
7172
"""Evaluate LTI system response at an array of frequencies.
@@ -217,9 +218,6 @@ def ispassive(self):
217218
# importing here prevents circular dependancy
218219
from control.passivity import ispassive
219220
return ispassive(self)
220-
221-
def feedback(self, other=1, sign=-1):
222-
raise NotImplementedError(f"feedback not implemented for base {self.__class__.__name__} objects")
223221

224222
# convenience aliases
225223
# most function are only forward declaraed and patched in the __init__.py to avoid circular imports

‎control/matlab/wrappers.py‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
55
"""
66

7-
import numpy as np
8-
from scipy.signal import zpk2tf
97
import warnings
108
from warnings import warn
119

10+
import numpy as np
11+
from scipy.signal import zpk2tf
12+
13+
from ..exception import ControlArgument
14+
from ..lti import LTI
1215
from ..statesp import ss
1316
from ..xferfcn import tf
14-
from ..lti import LTI
15-
from ..exception import ControlArgument
1617

1718
__all__ = ['bode', 'nyquist', 'ngrid', 'rlocus', 'pzmap', 'dcgain', 'connect']
1819

@@ -127,7 +128,7 @@ def nyquist(*args, plot=True, **kwargs):
127128
Frequencies in rad/s.
128129
129130
"""
130-
from ..freqplot import nyquist_response, nyquist_plot
131+
from ..freqplot import nyquist_plot, nyquist_response
131132

132133
# If first argument is a list, assume python-control calling format
133134
if hasattr(args[0], '__iter__'):
@@ -311,6 +312,8 @@ def pzmap(*args, **kwargs):
311312

312313

313314
from ..nichols import nichols_grid
315+
316+
314317
def ngrid():
315318
return nichols_grid()
316319
ngrid.__doc__ = nichols_grid.__doc__
@@ -378,6 +381,8 @@ def dcgain(*args):
378381

379382

380383
from ..bdalg import connect as ct_connect
384+
385+
381386
def connect(*args):
382387
"""connect(sys, Q, inputv, outputv)
383388

‎control/statesp.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import numpy as np
2121
import scipy as sp
2222
import scipy.linalg
23-
# array needed in eval() call
2423
from numpy import array # noqa: F401
2524
from numpy import any, asarray, concatenate, cos, delete, empty, exp, eye, \
2625
isinf, pad, sin, squeeze, zeros
@@ -1487,7 +1486,7 @@ def output(self, t, x, u=None, params=None):
14871486
raise ValueError("len(u) must be equal to number of inputs")
14881487
return (self.C @ x).reshape((-1,)) \
14891488
+ (self.D @ u).reshape((-1,)) # return as row vector
1490-
1489+
14911490
# convenience aliase, import needs to go over the submodule to avoid circular imports
14921491
initial_response = control.timeresp.initial_response
14931492

0 commit comments

Comments
 (0)