Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Updated numpy is causing unit test error #231

Closed
@murrayrm

Description

@murrayrm

This problem was first flagged inslycot issue #35.

Instatesp_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 ofnumpy is generating a deprecation warning on top of the one coming frompython-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

No one assigned

    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


      [8]ページ先頭

      ©2009-2025 Movatter.jp