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 — TransferFunction array priority plus system type conversion checking by murrayrm · Pull Request #498 · python-control/python-control

Conversation

@murrayrm

@murrayrm murrayrm commented Jan 4, 2021

Copy link
Copy Markdown
Member

(This PR builds on #497, which is required for some of the functionality.)

This PR updates the __array_priority__ variable in the TransferFunction class that is used by numpy, as described in issue #459. With this change, multiplying a transfer function by an ndarray object gives a transfer function.

I also created a new unit test (control/tests/type_converstion_test.py) that goes through the matrix of interconnections in #497 and confirms that output type for each operation. In this current PR, no new functionality is included, but I did mark those entries that should (eventually) be updated. Depending on what people think about the PR, we can either leave those for another time or put them into this PR.

Sorry, something went wrong.

Uh oh!

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

All reactions
@sawyerbfuller
dev instructions
bb8132e
@murrayrm murrayrm changed the title TransferFunction array priority plus system type conversion checkin TransferFunction array priority plus system type conversion checking Jan 4, 2021
@coveralls

coveralls commented Jan 4, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.2%) to 87.677% when pulling e910c22 on murrayrm:array_priority+system_composition into 0eb4396 on python-control:master.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bnavigator

bnavigator commented Jan 4, 2021

Copy link
Copy Markdown
Contributor

So, wait on #497?

I also created a new unit test (control/tests/type_converstion_test.py)

On first glance, the test file looks good.

All reactions

Sorry, something went wrong.

Uh oh!

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

@murrayrm

murrayrm commented Jan 4, 2021

Copy link
Copy Markdown
Member Author

I'll update #497 tonight and also do one more small change here (putting in the final table of conversations for later use). Once #497 is integrated, I'll make sure this is rebased against that (should be OK, I think, since I started with that as my initial branch) and then we can merge this one as well.

All reactions

Sorry, something went wrong.

Uh oh!

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

bnavigator
bnavigator reviewed Jan 5, 2021
View reviewed changes
Comment thread control/tests/type_conversion_test.py Resolved

Uh oh!

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

@murrayrm
murrayrm force-pushed the array_priority+system_composition branch from 356189e to 06b7718 Compare January 5, 2021 19:09
@murrayrm murrayrm linked an issue Jan 5, 2021 that may be closed by this pull request
numpy.ndarray * control.TransferFunction gives array object #459
Closed
murrayrm and others added 11 commits January 6, 2021 11:39
@murrayrm
Merge branch 'master' of https://github.com/sawyerbfuller/python-control
51612df
@murrayrm
Merge branch 'call-method' of https://github.com/sawyerbfuller/python…
4ad565f
…-control
@murrayrm
Merge branch 'master' of https://github.com/python-control/python-con…
85c9e7f
…trol
@murrayrm
set array_priority=11 for TransferFunction, to match StateSpace
8793d78
@murrayrm
update _convert_to_transfer_function to allow 0D and 1D arrays
bd77d71
@murrayrm
rename _convertToX to _convert_to_x + statesp/ndarray unit tests
4b7bf8a
@murrayrm
fix converstion exceptions to be TypeError
94b6209
@murrayrm
add unit tests for checking type converstions
67a0561
@murrayrm
update LinearIOSystem.__rmul__ for Python2/Python3 consistency
4a24c84
@murrayrm
add (skipped) function for desired binary operator conversions
f0593fa
@murrayrm @bnavigator
Update control/tests/type_conversion_test.py
e910c22
Co-authored-by: Ben Greiner <[email protected]>
@murrayrm
murrayrm force-pushed the array_priority+system_composition branch from 06b7718 to e910c22 Compare January 8, 2021 05:57
@murrayrm
murrayrm merged commit 2d6c47f into python-control:master Jan 8, 2021
@murrayrm murrayrm mentioned this pull request Jan 8, 2021
Revert "dev instructions" #501
Merged
@murrayrm
murrayrm deleted the array_priority+system_composition branch January 14, 2021 07:04
@murrayrm murrayrm mentioned this pull request Jan 18, 2021
Implement missing type conversions for block diagram algebra #513
Open
@murrayrm murrayrm added this to the 0.9.0 milestone Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@bnavigator bnavigator bnavigator 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.9.0

Development

Successfully merging this pull request may close these issues.

numpy.ndarray * control.TransferFunction gives array object

Uh oh!

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

4 participants

@murrayrm @coveralls @bnavigator @sawyerbfuller
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.