GeezerVison is showing github.com — Unit tests failing after merging PR #34 · Issue #35 · python-control/Slycot
Unit tests failing after merging PR #34 #35
Description
Despite passing tests at the time PR #34 was submitted, after merging it is generating an error for Python 3.5 and 3.6 (OK for 2.7):
https://travis-ci.org/python-control/Slycot/builds/409595937
FAIL: testEvalFr (control.tests.statesp_test.TestStateSpace)
Evaluate the frequency response at one frequency.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/python-control/Slycot/control/control/tests/statesp_test.py", line 153, in testEvalFr
assert len(w) == 1
AssertionError
Activity
murrayrm commented on Jul 29, 2018
Did a bit of debugging: this is occurring in a section of the unit test code that is making sure that a deprecation warning pops up:
# Deprecated version of the call (should generate warning)
import warnings
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
sys.evalfr(1.)
assert len(w) == 1
assert issubclass(w[-1].category, PendingDeprecationWarning)
The problem seems to be related to a new release of numpy that is generating a deprecation warning on top of the one coming from python-control. As a consequence, the output from the command is:
/Users/murray/Dropbox/macosx/src/python-control/murrayrm/control/statesp.py:390: PendingDeprecationWarning: StateSpace.evalfr(omega) will be depracted in a future release of python-control; use evalfr(sys, omega*1j) instead
PendingDeprecationWarning)
/Users/murray/anaconda/envs/python3.5-test-slycot/lib/python3.5/site-packages/numpy/matrixlib/defmatrix.py:68: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
return matrix(data, dtype=dtype, copy=False)
The issue is thus a python-control problem and not a slycot problem. Have created python-control issue #231 to track this. Will leave this issue open until python-control is updated and the errors go away.
murrayrm commented on Jul 29, 2018
Metadata
Metadata
Development
No branches or pull requestsIssue actions