Title: Quantity with units returns True for __eq__ with plain numpy array · Issue #146 · python-quantities/python-quantities · GitHub
Open Graph Title: Quantity with units returns True for __eq__ with plain numpy array · Issue #146 · python-quantities/python-quantities
X Title: Quantity with units returns True for __eq__ with plain numpy array · Issue #146 · python-quantities/python-quantities
Description: Consider this: In [10]: 2.1*pq.m == np.array(2.1) Out[10]: True I would have expected it to return True only if the Quantity instance was dimensionless. What do others think? EDIT: since the numbers (arrays) cannot be added to each other...
Open Graph Description: Consider this: In [10]: 2.1*pq.m == np.array(2.1) Out[10]: True I would have expected it to return True only if the Quantity instance was dimensionless. What do others think? EDIT: since the number...
X Description: Consider this: In [10]: 2.1*pq.m == np.array(2.1) Out[10]: True I would have expected it to return True only if the Quantity instance was dimensionless. What do others think? EDIT: since the number...
Opengraph URL: https://github.com/python-quantities/python-quantities/issues/146
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Quantity with units returns True for __eq__ with plain numpy array ","articleBody":"Consider this:\r\n```\r\nIn [10]: 2.1*pq.m == np.array(2.1)\r\nOut[10]: True\r\n```\r\nI would have expected it to return True only if the Quantity instance was dimensionless.\r\nWhat do others think?\r\n\r\nEDIT:\r\nsince the numbers (arrays) cannot be added to each other, I think it really should be an error:\r\n```\r\n\u003e\u003e\u003e 3*pq.m + 3\r\nValueError ...\r\n```","author":{"url":"https://github.com/bjodah","@type":"Person","name":"bjodah"},"datePublished":"2018-01-28T16:12:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/146/python-quantities/issues/146"}
| 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:fd1532fb-05ff-4fc3-ca71-b54061042373 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 964E:154180:18E2609:20AA7FF:696B2D1C |
| html-safe-nonce | 718e768ad5e71c1a37c08569d1413b758eced950aa3346ba88183341c5970998 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjRFOjE1NDE4MDoxOEUyNjA5OjIwQUE3RkY6Njk2QjJEMUMiLCJ2aXNpdG9yX2lkIjoiMzkzMTA0OTE2NTM4NTgzNzg1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 81c1c2d1e43e7084a1093ee79971fe7db50bbadbcdb4255463c88bc22573648e |
| hovercard-subject-tag | issue:292216370 |
| 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/python-quantities/python-quantities/146/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c89d151fd38b392f1c43ce067f8155c1648b7c937a5e9137f71db0b2631259b0/python-quantities/python-quantities/issues/146 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c89d151fd38b392f1c43ce067f8155c1648b7c937a5e9137f71db0b2631259b0/python-quantities/python-quantities/issues/146 |
| og:image:alt | Consider this: In [10]: 2.1*pq.m == np.array(2.1) Out[10]: True I would have expected it to return True only if the Quantity instance was dimensionless. What do others think? EDIT: since the number... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bjodah |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python-quantities/python-quantities git https://github.com/python-quantities/python-quantities.git |
| octolytics-dimension-user_id | 222003 |
| octolytics-dimension-user_login | python-quantities |
| octolytics-dimension-repository_id | 560911 |
| octolytics-dimension-repository_nwo | python-quantities/python-quantities |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 560911 |
| octolytics-dimension-repository_network_root_nwo | python-quantities/python-quantities |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width