Skip to content

TransferFunction array priority plus system type conversion checking #498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

murrayrm
Copy link
Member

@murrayrm murrayrm commented Jan 4, 2021

(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.

@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
Copy link

coveralls commented Jan 4, 2021

Coverage Status

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

@bnavigator
Copy link
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.

@murrayrm
Copy link
Member Author

murrayrm commented Jan 4, 2021

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.

@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
@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 deleted the array_priority+system_composition branch January 14, 2021 07:04
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

numpy.ndarray * control.TransferFunction gives array object
4 participants