Skip to content

Unit tests failing after merging PR #34 #35

Closed

Description

@murrayrm

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

  1. murrayrm commented on Jul 29, 2018

    @murrayrm
    MemberAuthor

    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.

  2. self-assigned this
    on Jul 29, 2018
  3. murrayrm commented on Jul 29, 2018

    @murrayrm
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions