GeezerVison is showing github.com — fix issue with multiplying MIMO LTI system by scalar by murrayrm · Pull Request #1078 · python-control/python-control
Conversation
murrayrm
commented
Dec 7, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
This PR addresses #1075 and also fixes a small bug with constant FRD systems with small numbers of frequency points.
Changes:
- Multiplying (*), adding (+), or subtracting (-) a constant from any (MIMO) LTI object now acts element-wise (same as ndarray's). This fixes a bug where multiplying a MIMO LTI system by a constant was multiplying by a matrix filled with the constant rather than a diagonal matrix (scaled identity).
- Specifying an FRD system with fewer than 4 frequency points was generating an error because the default settings try to set up a smooth (interpolating) response and the default degree of the fit was 3. The SciPy interpolation function requires k+1 data points for a degree k fit, so an exception was generated.
- Added unit tests that catch the bug in Multiplying a MIMO
TransferFunction by 1.0 multiplies by a matrix of ones, not identity #1075 but also check across all LTI system representations (frd, ss, tf).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coveralls
commented
Dec 7, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

coverage: 94.73% (+0.009%) from 94.721%
when pulling 3165881 on murrayrm:fix_scalar_tfops-06Dec2024
into 12dda4e on python-control:main.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.