Skip to content

Commit fd19250

Browse files
committed
Merge branch 'master' of github.com:jgoppert/python-control into dev
Conflicts: control/freqplot.py control/tests/test_control_matlab.py control/tests/xferfcn_test.py
2 parents 71cfb32 + eb6f8c4 commit fd19250

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

control/freqplot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ def nyquist_plot(syslist, omega=None, Plot=True, color='b',
245245

246246
# Label the frequencies of the points
247247
if (labelFreq):
248-
for xpt, ypt, omegapt in list(zip(x, y, omega))[::labelFreq]:
248+
ind = slice(None, None, labelFreq)
249+
for xpt, ypt, omegapt in zip(x[ind], y[ind], omega[ind]):
249250
# Convert to Hz
250251
f = omegapt/(2*sp.pi)
251252

control/tests/matlab_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def testFreqresp(self):
319319

320320
def testEvalfr(self):
321321
w = 1j
322-
self.assertEqual(evalfr(self.siso_ss1, w), 44.8-21.4j)
322+
np.testing..assert_almost_equal(evalfr(self.siso_ss1, w), 44.8-21.4j)
323323
evalfr(self.siso_ss2, w)
324324
evalfr(self.siso_ss3, w)
325325
evalfr(self.siso_tf1, w)

control/tests/test_control_matlab.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,5 +476,4 @@ def debug_nasty_import_problem():
476476
unittest.main()
477477
show()
478478
print("Test finished correctly!")
479-
480479
# vi:ts=4:sw=4:expandtab

control/tests/xferfcn_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
import numpy as np
88
from control.statesp import StateSpace, _convertToStateSpace
99
from control.xferfcn import TransferFunction, _convertToTransferFunction
10-
from control.lti import isdtime
10+
# from control.lti import isdtime
11+
1112

1213
class TestXferFcn(unittest.TestCase):
1314
"""These are tests for functionality and correct reporting of the transfer
@@ -94,12 +95,11 @@ def testTruncateCoeff2(self):
9495

9596
# Tests for TransferFunction.__neg__
9697

97-
9898
@unittest.skip("skipping, known issue with Python 3")
9999
def testNegScalar(self):
100100
"""Negate a direct feedthrough system."""
101101

102-
sys1 = TransferFunction(2., np.array([-3]))
102+
sys1 = TransferFunction(2., np.array([-3.]))
103103
sys2 = - sys1
104104

105105
np.testing.assert_array_equal(sys2.num, [[[-2.]]])

0 commit comments

Comments
 (0)