GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Freqplot improvements introduced warning messages in tests · Issue #538 · python-control/python-control

Freqplot improvements introduced warning messages in tests #538

New issue
Copy link
New issue
Copy link
Closed
#543
Closed
Freqplot improvements introduced warning messages in tests#538
#543
Copy link

Description

@murrayrm
murrayrm
opened on Feb 8, 2021
Issue body actions

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?

Activity

  1. sawyerbfuller commented on Feb 8, 2021

    @sawyerbfuller
    sawyerbfuller
    on Feb 8, 2021
    Contributor
    More actions

    Hadn’t seen that. Not at my computer so I can’t yet confirm, but I think that if those are all DT systems, a possible explanation is that I changed the code to evaluate all the way up to and including the nyquist frequency. A pole at -1 might cause such a warning.

  2. murrayrm commented on Feb 8, 2021

    @murrayrm
    murrayrm
    on Feb 8, 2021
    MemberAuthor
    More actions

    It looks like they are all discrete time systems, so that's probably it.

    I'm working on some code for issue #532 and will be adding some flags to turn off warnings, so that is one possible fix. But probably worth thinking about what the right approach is in terms of the evaluating/plotting the frequency response at those values.

  3. sawyerbfuller commented on Feb 9, 2021

    @sawyerbfuller
    sawyerbfuller
    on Feb 9, 2021
    Contributor
    More actions

    Yep, confirmed the system has a pole at -1 and that's what causes a warning when running bode. Thinking about what to do about it. Bode plot still works but it has a gap in the line near the nyquist plot (from the nan's).

  4. murrayrm
    linked a pull request that will close this issueeliminate warnings in freqresp_test.py #543on Feb 12, 2021
  5. murrayrm
    closed this as completedin #543on Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.