Skip to content

Freqplot improvements introduced warning messages in tests #538

Description

@murrayrm

It looks like PR #522 introduced some warning messages in our GitHub Action tests:

control/tests/freqresp_test.py::test_discrete[tf-0.1]
control/tests/freqresp_test.py::test_discrete[tf-0.1]
control/tests/freqresp_test.py::test_discrete[tf-True]
control/tests/freqresp_test.py::test_discrete[tf-True]
  /home/runner/work/python-control/python-control/control/xferfcn.py:310: RuntimeWarning: divide by zero encountered in true_divide
    out[i][j] = (polyval(self.num[i][j], x) /

control/tests/freqresp_test.py::test_discrete[tf-0.1]
control/tests/freqresp_test.py::test_discrete[tf-0.1]
control/tests/freqresp_test.py::test_discrete[tf-True]
control/tests/freqresp_test.py::test_discrete[tf-True]
  /home/runner/work/python-control/python-control/control/xferfcn.py:310: RuntimeWarning: invalid value encountered in true_divide
    out[i][j] = (polyval(self.num[i][j], x) /

I'm not quite sure what is generating the warnings, but it would be good to get rid of them if we can.

Test results here: https://github.com/python-control/python-control/pull/522/checks

@sawyerbfuller Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions