Title: fixes to unit tests so that they pass when the default array type is ndarray by sawyerbfuller · Pull Request #433 · python-control/python-control · GitHub
Open Graph Title: fixes to unit tests so that they pass when the default array type is ndarray by sawyerbfuller · Pull Request #433 · python-control/python-control
X Title: fixes to unit tests so that they pass when the default array type is ndarray by sawyerbfuller · Pull Request #433 · python-control/python-control
Description: instead of deprecated matrix class. Changes entailed: slicing fixes in code. In particular, if A is a matrix, A[:, 1] is still a 2D matrix, but if A is an ndarray, 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. use np.dot instead of * to multiply matrices in a few unit tests if B or C are given as 1d arrays, new code in statesp.__init__ attempts to determine whether they should be row or column vectors. completes tasks in #314 I checked on my computer and unit tests also pass when the default array type is matrix.
Open Graph Description: instead of deprecated matrix class. Changes entailed: slicing fixes in code. In particular, if A is a matrix, A[:, 1] is still a 2D matrix, but if A is an ndarray, that slice results in a 1D vecto...
X Description: instead of deprecated matrix class. Changes entailed: slicing fixes in code. In particular, if A is a matrix, A[:, 1] is still a 2D matrix, but if A is an ndarray, that slice results in a 1D vecto...
Opengraph URL: https://github.com/python-control/python-control/pull/433
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:6f8ad93f-f73e-d1e2-b1ca-f102d11339a8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BC20:12F576:407C05:58375E:697BD0DB |
| html-safe-nonce | c36c406ed4aad4f9853c049d4b2520bf4a6bfc32fff6715127520c2354e7f72a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzIwOjEyRjU3Njo0MDdDMDU6NTgzNzVFOjY5N0JEMERCIiwidmlzaXRvcl9pZCI6IjI5NjE1MDk2Njg5NjM5OTU4NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c584c6cd22b40781cfc10c182b99f21de5d45b66768b0df3f59a5ec61eb328a7 |
| hovercard-subject-tag | pull_request:455346679 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-control/python-control/pull/433/files |
| twitter:image | https://avatars.githubusercontent.com/u/58706249?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/58706249?s=400&v=4 |
| og:image:alt | instead of deprecated matrix class. Changes entailed: slicing fixes in code. In particular, if A is a matrix, A[:, 1] is still a 2D matrix, but if A is an ndarray, that slice results in a 1D vecto... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 88b7b3079ea5046bb661ad315dabef17ecc28e5f9f988d30044f4f6e56520728 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python-control/python-control git https://github.com/python-control/python-control.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 22791752 |
| octolytics-dimension-repository_nwo | python-control/python-control |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22791752 |
| octolytics-dimension-repository_network_root_nwo | python-control/python-control |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 42cddef55c232612d1a39797b85abf955112a1b4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width