Title: [ENH]: A data-type check is missed in cm.ScalarMappable.set_array() · Issue #21095 · matplotlib/matplotlib · GitHub
Open Graph Title: [ENH]: A data-type check is missed in cm.ScalarMappable.set_array() · Issue #21095 · matplotlib/matplotlib
X Title: [ENH]: A data-type check is missed in cm.ScalarMappable.set_array() · Issue #21095 · matplotlib/matplotlib
Description: Problem If a list is introduced to cm.ScalarMappable.set_array() method, no error is raised and, nevertheless, probably an error will be raised. At least, it's raised when using collections: AttributeError: 'list' object has no attribute...
Open Graph Description: Problem If a list is introduced to cm.ScalarMappable.set_array() method, no error is raised and, nevertheless, probably an error will be raised. At least, it's raised when using collections: Attrib...
X Description: Problem If a list is introduced to cm.ScalarMappable.set_array() method, no error is raised and, nevertheless, probably an error will be raised. At least, it's raised when using collections: At...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/21095
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: A data-type check is missed in cm.ScalarMappable.set_array()","articleBody":"### Problem\n\nIf a list is introduced to cm.ScalarMappable.set_array() method, no error is raised and, nevertheless, probably an error will be raised.\r\n\r\nAt least, it's raised when using collections:\r\n\r\nAttributeError: 'list' object has no attribute 'ndim'\n\n### Proposed solution\n\nI think it could be great to add a data type check when data is introduced to this method Although the own name of the method means that the enter data-type must be a numpy array, I think it could be less messy if an exception (or something similar) would be added within this method.\n\n### Additional context and prior art\n\n_No response_","author":{"url":"https://github.com/MiguelonGonzalez","@type":"Person","name":"MiguelonGonzalez"},"datePublished":"2021-09-16T11:00:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/21095/matplotlib/issues/21095"}
| 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:b01545b1-0f04-d5bd-c777-d5dcea50fb41 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A042:139708:4EC69DC:6ED3A4A:6A5103DB |
| html-safe-nonce | 8d892d1c84968a5d887f7cd3937a5c3da9e240ce486cb8b68bdafe89dab3466c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDQyOjEzOTcwODo0RUM2OURDOjZFRDNBNEE6NkE1MTAzREIiLCJ2aXNpdG9yX2lkIjoiMzk3NDE5NzA5ODM0NjI1MTIyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7d139e9f2c8df23ef16a08e761f5172297433dde0aac070cd9041d3882151ad8 |
| hovercard-subject-tag | issue:998075602 |
| 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/21095/issue_layout |
| twitter:image | https://opengraph.githubassets.com/afb33d08d9ed1a404aad2249411ebcf60d903dbb3bf2d5aa1056354832b6daa2/matplotlib/matplotlib/issues/21095 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/afb33d08d9ed1a404aad2249411ebcf60d903dbb3bf2d5aa1056354832b6daa2/matplotlib/matplotlib/issues/21095 |
| og:image:alt | Problem If a list is introduced to cm.ScalarMappable.set_array() method, no error is raised and, nevertheless, probably an error will be raised. At least, it's raised when using collections: Attrib... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MiguelonGonzalez |
| hostname | github.com |
| expected-hostname | github.com |
| None | 38906a4da4e3e9fd88dfeacee232f5932c0c5f7495de3b4efc53ddfac7173d12 |
| 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 | 90441ea9b98e7491aa6ebcd135fccce4e2396f48 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width