Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enable scalar division of state-space objects#811

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
murrayrm merged 3 commits intopython-control:mainfromroryyorke:rory/ss-div-scalar
Dec 16, 2022

Conversation

roryyorke
Copy link
Contributor

I think this is a reasonable if minor improvement; it lets one writegscaled = g / 2 instead ofgscaled = g * (1/2). I'm less sure about division by arrays, but I see multiplication by arrays is allowed, and it seems natural to have symmetry between these operations.

I added a simple test forStateSpace / scalar andStateSpace / array, but not forInputOutputSystem / scalar. etc.

I also modified the type-conversion tests as required.

Attempt division by any non-LTI and non-NameIOSystem by translating G/ k to G * (1/k).Division of StateSpace by TransferFunction, etc., unchanged.
These aren't used in Python 3.
@coveralls
Copy link

coveralls commentedDec 10, 2022
edited
Loading

Coverage Status

Coverage increased (+0.05%) to 94.855% when pullingcc3fb2f on roryyorke:rory/ss-div-scalar into9d65bf8 on python-control:main.

Copy link
Member

@murrayrmmurrayrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.

@@ -346,6 +346,17 @@ def __neg__(sys):
# Return the newly created system
return newsys

def __truediv__(sys2, sys1):
"""Multiply two input/output systems (series interconnection)"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

should this docstring say "divide"?

Copy link
Contributor

@sawyerbfullersawyerbfuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

looks good to me - with one possible update in a docstrong

@roryyorke
Copy link
ContributorAuthor

roryyorke commentedDec 13, 2022 via email

Whoops, yes. Should be similar to StateSpace truediv docstring. Earliest Ican look at this is Friday.
On Mon, 12 Dec 2022, 18:55 Sawyer Fuller, ***@***.***> wrote: ***@***.**** commented on this pull request. ------------------------------ In control/iosys.py <#811 (comment)> : > @@ -346,6 +346,17 @@ def __neg__(sys): # Return the newly created system return newsys + def __truediv__(sys2, sys1): + """Multiply two input/output systems (series interconnection)""" should this docstring say "divide"? — Reply to this email directly, view it on GitHub <#811 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAA3C7TWMZLIXFWKP4YPHCDWM5KGRANCNFSM6AAAAAAS2FXV4E> . You are receiving this because you authored the thread.Message ID: ***@***.***>

@murrayrmmurrayrm merged commit4b712a4 intopython-control:mainDec 16, 2022
@murrayrmmurrayrm added this to the0.9.3 milestoneDec 24, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@murrayrmmurrayrmmurrayrm left review comments

@sawyerbfullersawyerbfullersawyerbfuller requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.9.3
Development

Successfully merging this pull request may close these issues.

4 participants
@roryyorke@coveralls@murrayrm@sawyerbfuller

[8]ページ先頭

©2009-2025 Movatter.jp