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 — fix issue with multiplying MIMO LTI system by scalar by murrayrm · Pull Request #1078 · python-control/python-control

Conversation

@murrayrm

@murrayrm murrayrm commented Dec 7, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

All reactions
@murrayrm
fix issue with multiplying MIMO LTI system by scalar
9acbfbb
@murrayrm murrayrm linked an issue Dec 7, 2024 that may be closed by this pull request
Multiplying a MIMO TransferFunction by 1.0 multiplies by a matrix of ones, not identity #1075
Closed
@murrayrm murrayrm mentioned this pull request Dec 7, 2024
Proposal for multiplying a NumPy array by a scalar TransferFunction #1076
Closed
@coveralls

coveralls commented Dec 7, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

coverage: 94.73% (+0.009%) from 94.721%
when pulling 3165881 on murrayrm:fix_scalar_tfops-06Dec2024
into 12dda4e on python-control:main.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slivingston
slivingston self-requested a review December 8, 2024 17:07
slivingston
slivingston reviewed Dec 10, 2024
View reviewed changes
Comment thread control/xferfcn.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

slivingston
slivingston reviewed Dec 10, 2024
View reviewed changes
Comment thread control/xferfcn.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

slivingston
slivingston reviewed Dec 10, 2024
View reviewed changes
Comment thread control/xferfcn.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

slivingston added 3 commits December 10, 2024 16:03
@slivingston
fix misprint
0b9be7a
@slivingston
fix misprint
f514f7c
@slivingston
fix misprint
3165881
@slivingston
slivingston merged commit 8b6d041 into python-control:main Dec 11, 2024
@murrayrm murrayrm added this to the 0.10.2 milestone Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@slivingston slivingston slivingston left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

0.10.2

Development

Successfully merging this pull request may close these issues.

Multiplying a MIMO TransferFunction by 1.0 multiplies by a matrix of ones, not identity

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@murrayrm @coveralls @slivingston
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.
You are visitor 01402503 — 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.