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

ctrb treats ndim=1 B correctly; ctrb & obsv check input shapes#1099

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

Conversation

@roryyorke
Copy link
Contributor

I also fixed easy errors pointed out bypyflakes in the two files I changed; these remain. The first one's obviously a bug, I'll open an issue. Not sure about the second two, probably just oversights?

Fixesgh-1097.

control/statefbk.py:278:5: local variable 'b' is assigned to but never usedcontrol/tests/statefbk_test.py:857:13: local variable 'Ki' is assigned to but never usedcontrol/tests/statefbk_test.py:1237:5: local variable 'points' is assigned to but never used

@coveralls
Copy link

coveralls commentedJan 19, 2025
edited
Loading

Coverage Status

coverage: 94.69% (+0.003%) from 94.687%
when pullingb13ade4 on roryyorke:gh1097-ctrb-obsv-shapes
into0ff0452 on python-control:main.

@murrayrm
Copy link
Member

LGTM. Will merge in a bit (just in case someone else wants to take a look).

@slivingstonslivingston self-requested a reviewJanuary 20, 2025 03:00
Copy link
Member

@slivingstonslivingston left a comment

Choose a reason for hiding this comment

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

Code is correct. I found a misprint in the test comments. If I simply misinterpreted the comment, feel free to merge.

@roryyorke
Copy link
ContributorAuthor

roryyorke commentedJan 20, 2025 via email

The suggested change is right, tha ks.
On Mon, 20 Jan 2025, 05:20 Scott C. Livingston, ***@***.***> wrote: ***@***.**** approved this pull request. Code is correct. I found a misprint in the test comments. If I simply misinterpreted the comment, feel free to merge. ------------------------------ In control/tests/statefbk_test.py <#1099 (comment)> : > @@ -79,6 +96,23 @@ def testObsvT(self): Wo = obsv(A, C, t=t) np.testing.assert_array_almost_equal(Wo, Wotrue) + def testObsvNdim1(self): + #gh-1097: treat 1-dim C as 1xn + A = np.array([[1., 2.], [3., 4.]]) + C = np.array([5., 7.]) + Wotrue = np.array([[5., 7.], [26., 38.]]) + Wo = obsv(A, C) + np.testing.assert_array_almost_equal(Wo, Wotrue) + + def testObsvRejectMismatch(self): + #gh-1097: check A, B for compatible shapes ⬇️ Suggested change - #gh-1097: check A, B for compatible shapes + #gh-1097: check A, C for compatible shapes — Reply to this email directly, view it on GitHub <#1099 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAA3C7QM7AIWRRKUS62XJE32LRTQHAVCNFSM6AAAAABVOMBZOOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKNRRGIZTMMRXHE> . You are receiving this because you authored the thread.Message ID: ***@***.***>

Co-authored-by: Scott C. Livingston <scott@rerobots.net>
@murrayrmmurrayrm merged commitbddc796 intopython-control:mainJan 20, 2025
11 of 12 checks passed
@murrayrmmurrayrm added this to the0.10.2 milestoneFeb 19, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@slivingstonslivingstonslivingston approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

0.10.2

Development

Successfully merging this pull request may close these issues.

Unexpected and unwanted behaviour of control.ctrb

4 participants

@roryyorke@coveralls@murrayrm@slivingston

[8]ページ先頭

©2009-2025 Movatter.jp