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/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:3bae4f48-347c-717b-f35a-fb27f20baa3f |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | D412:3451C3:4536079:5D6B7DF:697B2289 |
| html-safe-nonce | 68ba35da3aa8209287ba5da68adc397f27ea727fc8ae1d581ac460dbf61d23c0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDEyOjM0NTFDMzo0NTM2MDc5OjVENkI3REY6Njk3QjIyODkiLCJ2aXNpdG9yX2lkIjoiODE2MzM3Mjg0NTk5ODQ5NjEwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c8c44b3868452922e99c7ea0bceecaac39cdc9b328d6e92cdfdcb6d2380a3e4f |
| hovercard-subject-tag | pull_request:455346679 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/checks |
| 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 | 7ce8ed0a54c4730aeca4e6abacfc6490365fc42e25480b86883054df3f9181c8 |
| turbo-cache-control | no-preview |
| 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 full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82440e908b5650143b0930c6bf91e184f2bad20c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width