Title: [Bug]: Refactor of hexbin for 3.6.0 crashes with empty arrays and log scaling · Issue #23922 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Refactor of hexbin for 3.6.0 crashes with empty arrays and log scaling · Issue #23922 · matplotlib/matplotlib
X Title: [Bug]: Refactor of hexbin for 3.6.0 crashes with empty arrays and log scaling · Issue #23922 · matplotlib/matplotlib
Description: Bug summary With 3.5 and previously, doing hexbin with empty arrays and log scaling just produced an empty plot. With 3.6.0 it crashes. Code for reproduction import matplotlib.pyplot as plt plt.hexbin([], [], bins='log') Actual outcome ....
Open Graph Description: Bug summary With 3.5 and previously, doing hexbin with empty arrays and log scaling just produced an empty plot. With 3.6.0 it crashes. Code for reproduction import matplotlib.pyplot as plt plt.hex...
X Description: Bug summary With 3.5 and previously, doing hexbin with empty arrays and log scaling just produced an empty plot. With 3.6.0 it crashes. Code for reproduction import matplotlib.pyplot as plt plt.hex...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23922
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Refactor of hexbin for 3.6.0 crashes with empty arrays and log scaling","articleBody":"### Bug summary\n\nWith 3.5 and previously, doing hexbin with empty arrays and log scaling just produced an empty plot. With 3.6.0 it crashes.\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\r\n\r\nplt.hexbin([], [], bins='log')\n```\n\n\n### Actual outcome\n\n...\r\n\r\nFile ~/miniforge3/envs/mpl36/lib/python3.10/site-packages/numpy/core/_methods.py:44, in _amin(a, axis, out, keepdims, initial, where)\r\n 42 def _amin(a, axis=None, out=None, keepdims=False,\r\n 43 initial=_NoValue, where=True):\r\n---\u003e 44 return umr_minimum(a, axis, None, out, keepdims, initial, where)\r\n\r\nValueError: zero-size array to reduction operation minimum which has no identity\r\n\n\n### Expected outcome\n\nIt just runs and then a `plt.show()` gives an empty rectangle.\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nmacos arm64\n\n### Matplotlib Version\n\n3.6.0\n\n### Matplotlib Backend\n\nMacOSX\n\n### Python version\n\n3.10\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nconda","author":{"url":"https://github.com/erykoff","@type":"Person","name":"erykoff"},"datePublished":"2022-09-17T18:02:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/23922/matplotlib/issues/23922"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:517023a9-e7e8-d94f-b303-a3351e73781d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D376:6F3CF:9878A44:D70687A:6A51116B |
| html-safe-nonce | 9f41e42491b2df0b94b8adb540f6aa4fc5db05a4703486345a5c6e3a8825d4bd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzc2OjZGM0NGOjk4NzhBNDQ6RDcwNjg3QTo2QTUxMTE2QiIsInZpc2l0b3JfaWQiOiI0MjQwODY4OTk3ODI0ODQ0MTQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ee9b91310a31ba9dcb71a522dd095614cedd871d7a9146cc01587cade68a0959 |
| hovercard-subject-tag | issue:1376836745 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/matplotlib/matplotlib/23922/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5672ed4cb2643a8462dfa6ca924318ae01fb21fcf6f72fd3008aa074bac4b749/matplotlib/matplotlib/issues/23922 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5672ed4cb2643a8462dfa6ca924318ae01fb21fcf6f72fd3008aa074bac4b749/matplotlib/matplotlib/issues/23922 |
| og:image:alt | Bug summary With 3.5 and previously, doing hexbin with empty arrays and log scaling just produced an empty plot. With 3.6.0 it crashes. Code for reproduction import matplotlib.pyplot as plt plt.hex... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | erykoff |
| hostname | github.com |
| expected-hostname | github.com |
| None | b076e100febaa00374cd89239f915d00dd3187f7c68b12bc2b7688181305344d |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f9137f6d981cbbfd780af369f80ce890b2d0d2d4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width