Title: Bug causes to_rgba to fail inside cm.py · Issue #10890 · matplotlib/matplotlib · GitHub
Open Graph Title: Bug causes to_rgba to fail inside cm.py · Issue #10890 · matplotlib/matplotlib
X Title: Bug causes to_rgba to fail inside cm.py · Issue #10890 · matplotlib/matplotlib
Description: I was running a test with some new images and plotting, code called cm.to_rgba() to convert the files for keras processing. Matplotlib 2.1.2 (but verified in the current repository) It 'works' however it throws an error, by mistake due t...
Open Graph Description: I was running a test with some new images and plotting, code called cm.to_rgba() to convert the files for keras processing. Matplotlib 2.1.2 (but verified in the current repository) It 'works' howe...
X Description: I was running a test with some new images and plotting, code called cm.to_rgba() to convert the files for keras processing. Matplotlib 2.1.2 (but verified in the current repository) It 'works...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/10890
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug causes to_rgba to fail inside cm.py","articleBody":"I was running a test with some new images and plotting, code called cm.to_rgba() to convert the files for keras processing.\r\n\r\nMatplotlib 2.1.2 (but verified in the current repository)\r\n\r\nIt 'works' however it throws an error, by mistake due to this error in code:\r\n```\r\n if xx.dtype.kind == 'f':\r\n if norm and xx.max() \u003e 1 or xx.min() \u003c 0:\r\n raise ValueError(\"Floating point image RGB values \"\r\n \"must be in the 0..1 range.\")\r\n```\r\n\r\nIf xx.min() \u003c0 then this code piece triggers.\r\n\r\nShould be:\r\n```\r\n if xx.dtype.kind == 'f':\r\n if norm and (xx.max() \u003e 1 or xx.min() \u003c 0):\r\n raise ValueError(\"Floating point image RGB values \"\r\n \"must be in the 0..1 range.\")\r\n```\r\n\r\nSorry.. not familiar enough with making pull requests and changes myself to do this!\r\n","author":{"url":"https://github.com/Eagleames","@type":"Person","name":"Eagleames"},"datePublished":"2018-03-27T14:19:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":19},"url":"https://github.com/10890/matplotlib/issues/10890"}
| 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:e077d913-e957-da2b-d7bf-e61dfcdf97b7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D700:1BA1D0:4C1543:6455A5:6A52FF4D |
| html-safe-nonce | 2d87bc1bff1b18cad20a3c8c5c140374e17762bbc75fe02605dd59b6168e0218 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzAwOjFCQTFEMDo0QzE1NDM6NjQ1NUE1OjZBNTJGRjREIiwidmlzaXRvcl9pZCI6Ijg2OTA1ODc5MjU0NTk2OTc0ODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 528bf3ef525143a259abc80e8d00ace8f340d2f70e04b1d067c0f666009d7c20 |
| hovercard-subject-tag | issue:308990115 |
| 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/10890/issue_layout |
| twitter:image | https://opengraph.githubassets.com/665b503a038c65638cb3e069cf7954168da6c8e1874563daf7cd9c166e13db3d/matplotlib/matplotlib/issues/10890 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/665b503a038c65638cb3e069cf7954168da6c8e1874563daf7cd9c166e13db3d/matplotlib/matplotlib/issues/10890 |
| og:image:alt | I was running a test with some new images and plotting, code called cm.to_rgba() to convert the files for keras processing. Matplotlib 2.1.2 (but verified in the current repository) It 'works' howe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Eagleames |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width