Skip to content

Commit d532dc9

Browse files
committed
isort files
1 parent 5ca2d5c commit d532dc9

File tree

4 files changed

+37
-34
lines changed

4 files changed

+37
-34
lines changed

control/grid.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
# package to generate a custom grid that will scale with the figure.
66
#
77

8-
import numpy as np
9-
from numpy import cos, sin, sqrt, linspace, pi, exp
108
import matplotlib.pyplot as plt
11-
12-
from mpl_toolkits.axisartist import SubplotHost
13-
from mpl_toolkits.axisartist.grid_helper_curvelinear \
14-
import GridHelperCurveLinear
159
import mpl_toolkits.axisartist.angle_helper as angle_helper
10+
import numpy as np
1611
from matplotlib.projections import PolarAxes
1712
from matplotlib.transforms import Affine2D
13+
from mpl_toolkits.axisartist import SubplotHost
14+
from mpl_toolkits.axisartist.grid_helper_curvelinear import \
15+
GridHelperCurveLinear
16+
from numpy import cos, exp, linspace, pi, sin, sqrt
1817

1918
from .iosys import isdtime
2019

control/pzmap.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,21 @@
99
# computation of root locus diagrams is in rlocus.py.)
1010
#
1111

12-
import numpy as np
13-
from numpy import real, imag, linspace, exp, cos, sin, sqrt
14-
import matplotlib.pyplot as plt
15-
from math import pi
1612
import itertools
1713
import warnings
14+
from math import pi
15+
16+
import matplotlib.pyplot as plt
17+
import numpy as np
18+
from numpy import cos, exp, imag, linspace, real, sin, sqrt
1819

20+
from . import config
21+
from .freqplot import _freqplot_defaults, _get_line_labels
22+
from .grid import nogrid, sgrid, zgrid
23+
from .iosys import isctime, isdtime
1924
from .lti import LTI
20-
from .iosys import isdtime, isctime
21-
from .grid import sgrid, zgrid, nogrid
2225
from .statesp import StateSpace
2326
from .xferfcn import TransferFunction
24-
from .freqplot import _freqplot_defaults, _get_line_labels
25-
from . import config
2627

2728
__all__ = ['pole_zero_map', 'pole_zero_plot', 'pzmap', 'PoleZeroData']
2829

@@ -424,8 +425,8 @@ def pole_zero_plot(
424425
if len(labels) > 1 and legend_loc is not False:
425426
if response.loci is None:
426427
# Use "x o" for the system label, via matplotlib tuple handler
427-
from matplotlib.lines import Line2D
428428
from matplotlib.legend_handler import HandlerTuple
429+
from matplotlib.lines import Line2D
429430

430431
line_tuples = []
431432
for pole_line in lines:
@@ -532,7 +533,7 @@ def _find_root_locus_gain(event, sys, ax):
532533

533534
# Mark points corresponding to a given gain on root locus plot
534535
def _mark_root_locus_gain(ax, sys, K):
535-
from .rlocus import _systopoly1d, _RLFindRoots
536+
from .rlocus import _RLFindRoots, _systopoly1d
536537

537538
# Remove any previous gain points
538539
for line in reversed(ax.lines):

control/rlocus.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@
1515
# * added compatibility with discrete-time systems.
1616
#
1717

18-
# Packages used by this module
18+
import warnings
1919
from functools import partial
20-
import numpy as np
20+
2121
import matplotlib.pyplot as plt
22-
from numpy import array, poly1d, row_stack, zeros_like, real, imag
23-
import scipy.signal # signal processing toolbox
24-
from .iosys import isdtime
25-
from .xferfcn import _convert_to_transfer_function
26-
from .exception import ControlMIMONotImplemented
22+
import numpy as np
23+
import scipy.signal # signal processing toolbox
24+
from numpy import array, imag, poly1d, real, row_stack, zeros_like
25+
2726
from . import config
27+
from .exception import ControlMIMONotImplemented
28+
from .iosys import isdtime
2829
from .lti import LTI
29-
import warnings
30+
from .xferfcn import _convert_to_transfer_function
3031

3132
__all__ = ['root_locus_map', 'root_locus_plot', 'root_locus', 'rlocus']
3233

control/sisotool.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
__all__ = ['sisotool', 'rootlocus_pid_designer']
22

3-
import numpy as np
4-
import matplotlib.pyplot as plt
53
import warnings
64
from functools import partial
75

6+
import matplotlib.pyplot as plt
7+
import numpy as np
8+
89
from control.exception import ControlMIMONotImplemented
10+
from control.statesp import _convert_to_statespace
11+
12+
from . import config
13+
from .bdalg import append, connect
914
from .freqplot import bode_plot
10-
from .timeresp import step_response
1115
from .iosys import common_timebase, isctime, isdtime
1216
from .lti import frequency_response
13-
from .xferfcn import tf
14-
from .statesp import ss, summing_junction
15-
from .bdalg import append, connect
1617
from .nlsys import interconnect
17-
from control.statesp import _convert_to_statespace
18-
from . import config
18+
from .statesp import ss, summing_junction
19+
from .timeresp import step_response
20+
from .xferfcn import tf
1921

2022
_sisotool_defaults = {
2123
'sisotool.initial_gain': 1
@@ -158,8 +160,8 @@ def _click_dispatcher(event, sys, ax, bode_plot_params, tvect):
158160
# if a point is clicked on the rootlocus plot visually emphasize it
159161
# K = _RLFeedbackClicksPoint(
160162
# event, sys, fig, ax_rlocus, show_clicked=True)
161-
from .pzmap import _find_root_locus_gain, _mark_root_locus_gain, \
162-
_create_root_locus_label
163+
from .pzmap import _create_root_locus_label, _find_root_locus_gain, \
164+
_mark_root_locus_gain
163165

164166
K, s = _find_root_locus_gain(event, sys, ax)
165167
if K is not None:

0 commit comments

Comments
 (0)