- Notifications
You must be signed in to change notification settings - Fork446
fixes to unit tests so that they pass when the default array type is ndarray#433
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
fixes to unit tests so that they pass when the default array type is ndarray#433
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…y instead of matrix. two failing unit tests to fix still
coveralls commentedJul 23, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
bnavigator commentedJul 23, 2020
I made a test merge inbnavigator#1 and reactivated TravisCI for my fork. Tests look good so far, there were merge conflicts in both merges, because the edits were in lines next to each other. Please check, if I resolved correctly. |
bnavigator commentedJul 23, 2020
Regarding the actual PR: Could you add a CI job that runs the tests with default |
control/statesp.py Outdated
| # Define module default parameter values | ||
| _statesp_defaults= { | ||
| 'statesp.use_numpy_matrix':True, | ||
| 'statesp.use_numpy_matrix':False, |
bnavigatorJul 23, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Shouldn't we only change defaults in a major release?
How about keeping the default, but adding a CI job as proposed to maintain ndarray compatibility until the default is changed for good? At the time of the default change, keep a CI job that tests for compatibility with matrix as long as it is supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
indeed. I don't know what the release plans are for big changes (wasn't sure this would go into the next release), but let me push a commit that reverses this for now, but that way we can still have unit test fixes.
sawyerbfuller commentedJul 23, 2020
Looks good to me -- I think! |
sawyerbfuller commentedJul 23, 2020
Could you possibly point me to where I might configure that? |
bnavigator commentedJul 23, 2020
I was a about to create a PR into yours, but your repo does not show up, when I try to select the Base Repository? Please pull the commit yourself:bnavigator@eda91ca |
sawyerbfuller commentedJul 23, 2020 via email
Ok sure. Kids just got home so I will have to do it when I have a moment atthe computer later this evening. On Thu, Jul 23, 2020 at 3:57 PM Ben Greiner ***@***.***> wrote: I was a about to create a PR into yours, but your repo does not show up, when I try to select the Base Repository? Please pull the commit yourself: ***@***.*** <bnavigator@eda91ca> git remote add bnavigatorhttps://github.com/bnavigator/python-control.git git fetch --all git merge bnavigator/pr433 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#433 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AN74SSO3KI2ZUSKN2O4BWCTR5C54HANCNFSM4PFCUGCA> . -- Sawyer FullerAssistant Professor of Mechanical EngineeringUniversity of Washingtonhttp://faculty.washington.edu/~minster/(Typed with my thumbs) |
bnavigator commentedJul 23, 2020
... and it found three more matrix/ndarray mismatches: Matrix to ndarray conversion produced the wrong dimension.
Same as above. |
sawyerbfuller commentedJul 24, 2020
Should I do a git push upstream now that it's merged? |
sawyerbfuller commentedJul 24, 2020
As for the errors you're seeing, I don't see them. To run tests locally, I've been running |
bnavigator commentedJul 24, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
That one is deprecated.
Not upstream but into your origin. I saw you did. And you see the failure in Travis CI here, too. |
sawyerbfuller commentedJul 24, 2020
OK I think I got those three bugs squashed. waiting on Travis to confirm. |
bnavigator commentedJul 24, 2020
BTW, I am working on the overall matrix/array testing.https://github.com/bnavigator/python-control/tree/array-matrix-tests |
bnavigator commentedAug 17, 2020
In my opinion, this PR should go into 0.8.4. The patch release will still have |
murrayrm commentedAug 17, 2020
Since this is mainly a developer-facing change (right?), seems OK to push it into master sooner rather than later (and hence have it be part of 0.8.4). |
bnavigator commentedAug 17, 2020
The user facing changes are in
Now a usercan use arrays. |
murrayrm commentedAug 17, 2020
Sounds backwards compatible, so seems fine for 0.8.4. |
Uh oh!
There was an error while loading.Please reload this page.
instead of deprecated
matrixclass. Changes entailed:Ais amatrix,A[:, 1]is still a 2D matrix, but ifAis anndarray, that slice results in a 1D vector. To fix, this was changed to e.g. A[:, 1:2], which perserves that the array is 2D after slicing.statesp.__init__attempts to determine whether they should be row or column vectors.I checked on my computer and unit tests also pass when the default array type is
matrix.