Title: Vectorize patch extraction in Axes3D.plot_surface by apaszke · Pull Request #16675 · matplotlib/matplotlib · GitHub
Open Graph Title: Vectorize patch extraction in Axes3D.plot_surface by apaszke · Pull Request #16675 · matplotlib/matplotlib
X Title: Vectorize patch extraction in Axes3D.plot_surface by apaszke · Pull Request #16675 · matplotlib/matplotlib
Description: PR Summary First of the improvements suggested in #16659. When rstride and cstride divide the numbers of rows and columns minus 1, all polygons have the same number of vertices which can be recovered using some stride tricks on NumPy arrays. On a toy benchmark of a 800x800 grid this allows to reduce the time it takes to produce this list of polygons from ~10s to ~60ms. The formatting gets a bit awkward in some places due to the 79 column limit 😕 Also, Flake 8 seems to report many errors in the files I've modified, but I've only tried to make sure the lines I've added don't show up to minimize the diff. PR Checklist Has Pytest style unit tests Code is Flake 8 compliant New features are documented, with examples if plot related Documentation is sphinx and numpydoc compliant Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there) Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way
Open Graph Description: PR Summary First of the improvements suggested in #16659. When rstride and cstride divide the numbers of rows and columns minus 1, all polygons have the same number of vertices which can be recover...
X Description: PR Summary First of the improvements suggested in #16659. When rstride and cstride divide the numbers of rows and columns minus 1, all polygons have the same number of vertices which can be recover...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/16675
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:129bea53-4b92-f6b3-b9da-7e7b62ebbd13 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9C0A:125C85:7F5C63:AA3163:6A51A8E5 |
| html-safe-nonce | dfebf4d0bd64cda0b46277e62950ab0712c487c46283f62035dcb8abffdb0978 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzBBOjEyNUM4NTo3RjVDNjM6QUEzMTYzOjZBNTFBOEU1IiwidmlzaXRvcl9pZCI6IjUwNTQ1MTQzOTcwMTczODUxODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 81bc576267e5e2741ea69e443d72547ce6714e27ae9a4d18237b38a6f8b81528 |
| hovercard-subject-tag | pull_request:384229426 |
| 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/matplotlib/matplotlib/pull/16675/files |
| twitter:image | https://avatars.githubusercontent.com/u/4583066?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4583066?s=400&v=4 |
| og:image:alt | PR Summary First of the improvements suggested in #16659. When rstride and cstride divide the numbers of rows and columns minus 1, all polygons have the same number of vertices which can be recover... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width