Skip to content

Commit faa1d72

Browse files
committed
updated isort's + remove extraneous spaces
1 parent 168977e commit faa1d72

File tree

11 files changed

+39
-27
lines changed

11 files changed

+39
-27
lines changed

control/bdalg.py

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

control/flatsys/__init__.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,11 @@
2929

3030
# Basis function families
3131
from .basis import BasisFamily
32-
from .poly import PolyFamily
3332
from .bezier import BezierFamily
3433
from .bspline import BSplineFamily
35-
34+
# Package functions
35+
from .flatsys import FlatSystem, flatsys, point_to_point, solve_flat_ocp
36+
from .linflat import LinearFlatSystem
37+
from .poly import PolyFamily
3638
# Classes
3739
from .systraj import SystemTrajectory
38-
from .flatsys import FlatSystem, flatsys
39-
from .linflat import LinearFlatSystem
40-
41-
# Package functions
42-
from .flatsys import point_to_point, solve_flat_ocp

control/flatsys/bezier.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313

1414
import numpy as np
1515
from scipy.special import binom, factorial
16+
1617
from .basis import BasisFamily
1718

19+
1820
class BezierFamily(BasisFamily):
1921
r"""Bezier curve basis functions.
2022

control/flatsys/bspline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
"""
1111

1212
import numpy as np
13-
from .basis import BasisFamily
1413
from scipy.interpolate import BSpline, splev
1514

15+
from .basis import BasisFamily
16+
17+
1618
class BSplineFamily(BasisFamily):
1719
"""B-spline basis functions.
1820

control/flatsys/linflat.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
66
"""
77

8-
import numpy as np
98
import control
10-
from .flatsys import FlatSystem
9+
import numpy as np
10+
1111
from ..statesp import StateSpace
12+
from .flatsys import FlatSystem
1213

1314

1415
class LinearFlatSystem(FlatSystem, StateSpace):

control/flatsys/poly.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212

1313
import numpy as np
1414
from scipy.special import factorial
15+
1516
from .basis import BasisFamily
1617

18+
1719
class PolyFamily(BasisFamily):
1820
r"""Polynomial basis functions.
1921

control/lti.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
"""
99

1010
import math
11+
from typing import Callable
1112
from warnings import warn
1213

1314
import numpy as np
1415
from numpy import abs, angle, real
1516

17+
import control
18+
1619
from . import config
1720
from .iosys import InputOutputSystem
18-
import control
19-
from typing import Callable
2021

2122
__all__ = ['poles', 'zeros', 'damp', 'evalfr', 'frequency_response',
2223
'freqresp', 'dcgain', 'bandwidth', 'LTI']
@@ -216,7 +217,7 @@ def ispassive(self):
216217
# importing here prevents circular dependancy
217218
from control.passivity import ispassive
218219
return ispassive(self)
219-
220+
220221
def feedback(self, other=1, sign=-1):
221222
raise NotImplementedError(f"feedback not implemented for base {self.__class__.__name__} objects")
222223

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/nlsys.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
from . import config
2626
from .iosys import InputOutputSystem, _parse_spec, _process_iosys_keywords, \
2727
_process_signal_list, common_timebase, iosys_repr, isctime, isdtime
28-
from .timeresp import _check_convert_array, _process_time_response, \
29-
TimeResponseData, TimeResponseList
28+
from .timeresp import TimeResponseData, TimeResponseList, \
29+
_check_convert_array, _process_time_response
3030

3131
__all__ = ['NonlinearIOSystem', 'InterconnectedSystem', 'nlsys',
3232
'input_output_response', 'find_eqpt', 'linearize',

control/statesp.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@
2121
import numpy as np
2222
import scipy as sp
2323
import scipy.linalg
24-
from numpy import any, array, asarray, concatenate, cos, delete, empty, \
25-
exp, eye, isinf, ones, pad, sin, squeeze, zeros
24+
from numpy import any, array, asarray, concatenate, cos, delete, empty, exp, \
25+
eye, isinf, ones, pad, sin, squeeze, zeros
2626
from numpy.linalg import LinAlgError, eigvals, matrix_rank, solve
2727
from numpy.random import rand, randn
2828
from scipy.signal import StateSpace as signalStateSpace
2929
from scipy.signal import cont2discrete
3030

31+
import control
32+
3133
from . import config
3234
from .exception import ControlMIMONotImplemented, ControlSlycot, slycot_check
3335
from .frdata import FrequencyResponseData
@@ -36,7 +38,6 @@
3638
common_timebase, iosys_repr, isdtime, issiso
3739
from .lti import LTI, _process_frequency_response
3840
from .nlsys import InterconnectedSystem, NonlinearIOSystem
39-
import control
4041

4142
try:
4243
from slycot import ab13dd
@@ -1432,7 +1433,7 @@ def output(self, t, x, u=None, params=None):
14321433
raise ValueError("len(u) must be equal to number of inputs")
14331434
return (self.C @ x).reshape((-1,)) \
14341435
+ (self.D @ u).reshape((-1,)) # return as row vector
1435-
1436+
14361437
# convenience aliase, import needs to go over the submodule to avoid circular imports
14371438
initial_response = control.timeresp.initial_response
14381439

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy