GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||
GeezerVison is showing github.com — Turn off warn_infinite for phase_crossover_frequencies() calculation by murrayrm · Pull Request #1106 · python-control/python-control Conversation
Member
This PR addresses #1105 where warning messages were being generated if a system had poles at the origin (which generates a phase crossover at infinity). The fix was simple: warning messages should be turned off when computing the crossover gains (as they are in
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
coverage: 94.649% (+0.001%) from 94.648% |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Good work! Besides my comment about the regression test, this is ready to merge.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| from ..frdata import FrequencyResponseData | ||
| from ..margins import margin, phase_crossover_frequencies, stability_margins | ||
| from ..statesp import StateSpace | ||
| from ..xferfcn import TransferFunction | ||
| from ..exception import ControlMIMONotImplemented |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
control package.control necessarily write absolute imports (import control or from control...). Tests of the public API should follow the patterns of users.control other than where they are located. In other words, "running tests from outside of the control package" is not done in practice, so not important to support.For comparison, neither numpy nor scipy seem to be consistent: most of their tests are written using absolute imports (import numpy or import scipy etc.), but some tests use relative imports.
I like the generality in principle of keeping these as absolute imports, but practically both patterns seem good.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ((np.array([3, 11, 3]) * 1e-4, [1., -2.7145, 2.4562, -0.7408], .1), | ||
| [1.6235, 0.], [-0.28598, 1.88889]), | ||
| (([200.0], [1.0, 21.0, 20.0, 0.0]), | ||
| [4.47213595, 0], [-0.47619048, inf]), |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Warnings do not cause the test to fail, so this case does not provide a regression test. To fix this, add the decorator @pytest.mark.filterwarnings("error") as done in another test in margin_test.py.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.