Title: fix complex -> real error messages by murrayrm · Pull Request #1086 · python-control/python-control · GitHub
Open Graph Title: fix complex -> real error messages by murrayrm · Pull Request #1086 · python-control/python-control
X Title: fix complex -> real error messages by murrayrm · Pull Request #1086 · python-control/python-control
Description: This is a small PR that fixes some errors I found when updating the documentation. In two cases, there was a complex-valued array getting used as a real-valued array (and generating an error message): In TransferFunction._common_den, the numerator and denominator polynomial's are computing by extracting poles and zeros and then regenerating polynomials. Because the poles and zeros can be complex, the operations generate a complex-valued array of coefficients. These should be cast back to real coefficients before assigning them back to the real-valued numerator and denominator coefficient arrays. This error showed up in examples/cruise.ipynb, which was also updated to remove the error message in the Output cells. In examples/describing-function.ipynb there was a plot of the describing function for a static nonlinearity. Because describing functions can be complex valued in general (eg, if there is hysteresis), before plotting the value of the real-valued describing function, the results needs to be explicitly cast to real (otherwise you get an error message). This was a small change in the Jupyter notebook. For the two Jupyter notebooks, all of the plots were also updated, even though they basically look the same => the changes look bigger than they are (and rendering the difference is very slow...).
Open Graph Description: This is a small PR that fixes some errors I found when updating the documentation. In two cases, there was a complex-valued array getting used as a real-valued array (and generating an error messa...
X Description: This is a small PR that fixes some errors I found when updating the documentation. In two cases, there was a complex-valued array getting used as a real-valued array (and generating an error messa...
Opengraph URL: https://github.com/python-control/python-control/pull/1086
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a6b5d3b2-b721-7639-8b36-1d5c6e820128 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A2DC:3F6A52:1CFB4C1:283B939:697C9DFF |
| html-safe-nonce | 24de73b5fc9ee2964457cbb62e66d0cccf2c2e6a09cb2c011bffc2cbc8c6e9d3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkRDOjNGNkE1MjoxQ0ZCNEMxOjI4M0I5Mzk6Njk3QzlERkYiLCJ2aXNpdG9yX2lkIjoiMjcxMzM2Mzc2MzAyNDQwMzk2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 00a15cbff9aafa114517e13c773c099c897afd4a64001d3ff7b67cb2cbd74ad2 |
| hovercard-subject-tag | pull_request:2254994870 |
| 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/1086/files |
| twitter:image | https://avatars.githubusercontent.com/u/293362?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/293362?s=400&v=4 |
| og:image:alt | This is a small PR that fixes some errors I found when updating the documentation. In two cases, there was a complex-valued array getting used as a real-valued array (and generating an error messa... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f30e23787c843d478679169eb69bc1bf04c9aaf526e14cad93570a516ad7b047 |
| 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 | 0bf17967680d17d40933881af78023e6675fa045 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width