8000 Fix warning messages in python3 tests · MorS25/python-control@b798bfa · GitHub
[go: up one dir, main page]

Skip to content

Commit b798bfa

Browse files
committed
Fix warning messages in python3 tests
Avoid using a deprecated call to pyplot.savefig, and eliminate a superfluous print statement in xferfun._common_den
1 parent da874f7 commit b798bfa

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

control/tests/frd_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ def testNyquist(self):
174174
omega = np.logspace(-1, 2, 40)
175175
f1 = FRD(h1, omega, smooth=True)
176176
freqplot.nyquist(f1, np.logspace(-1, 2, 100))
177-
plt.savefig('/dev/null', format='svg')
177+
# plt.savefig('/dev/null', format='svg')
178178
plt.figure(2)
179179
freqplot.nyquist(f1, f1.omega)
180-
plt.savefig('/dev/null', format='svg')
180+
# plt.savefig('/dev/null', format='svg')
181181

182182
def testMIMO(self):
183183
sys = StateSpace([[-0.5, 0.0], [0.0, -1.0]],

control/xferfcn.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -871,10 +871,6 @@ def _common_den(self, imag_tol=None):
871871
poles[n].imag * poles[n+m].imag > 0):
872872
m += 1
873873

874-
if (m > 1):
875-
print("Found pole with multiplicity %d" % m)
876-
# print("Poles = ", poles)
877-
878874
# Multiple pairs from the outside in
879875
for i in range(m):
880876
quad = polymul([1., -poles[n]], [1., -poles[n+2*(m-i)-1]])

0 commit comments

Comments
 (0)
0