Closed
Description
This problem was first flagged in slycot issue #35.
In statesp_test.py
the following code is used to check for a deprecation warning:
# 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)
A new release of numpy
is generating a deprecation warning on top of the one coming from python-control
:
/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)
As a consequence, we get two warnings instead of one and the unit test fails.
Short term fix would be to update the unit test, but the better fix would be to address the underlying numpy warning.
Metadata
Metadata
Assignees
Labels
No labels