Title: Comparison between quantities and plain numbers is inconsistent and unsafe · Issue #245 · python-quantities/python-quantities · GitHub
Open Graph Title: Comparison between quantities and plain numbers is inconsistent and unsafe · Issue #245 · python-quantities/python-quantities
X Title: Comparison between quantities and plain numbers is inconsistent and unsafe · Issue #245 · python-quantities/python-quantities
Description: If I have a quantity with a unit, e.g., t = 50 * pq.ms then t > 1 returns True whereas t.simplified > 1 returns False. Arguably, both should raise a ValueError just like t - 1 does in this example. If the community agrees, I would be hap...
Open Graph Description: If I have a quantity with a unit, e.g., t = 50 * pq.ms then t > 1 returns True whereas t.simplified > 1 returns False. Arguably, both should raise a ValueError just like t - 1 does in this example....
X Description: If I have a quantity with a unit, e.g., t = 50 * pq.ms then t > 1 returns True whereas t.simplified > 1 returns False. Arguably, both should raise a ValueError just like t - 1 does in this ex...
Opengraph URL: https://github.com/python-quantities/python-quantities/issues/245
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Comparison between quantities and plain numbers is inconsistent and unsafe","articleBody":"If I have a quantity with a unit, e.g.,\r\n\r\n t = 50 * pq.ms\r\n\r\nthen \r\n\r\n t \u003e 1\r\n\r\nreturns `True` whereas\r\n\r\n t.simplified \u003e 1\r\n\r\nreturns `False`. Arguably, both should raise a ValueError just like\r\n\r\n t - 1\r\n\r\ndoes in this example.\r\n\r\nIf the community agrees, I would be happy to prepare a pull request to change the behavior.","author":{"url":"https://github.com/wagenadl","@type":"Person","name":"wagenadl"},"datePublished":"2024-11-16T01:22:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/245/python-quantities/issues/245"}
| 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:da6ff892-75c8-5e13-af8f-d5198431bf42 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DDD8:25C52D:6559DB:82D4B0:696B11B1 |
| html-safe-nonce | ce3b9afc7a87754ff7d2458cb5f89dd8ad4d930b48a198fc984819a9e8496698 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEREQ4OjI1QzUyRDo2NTU5REI6ODJENEIwOjY5NkIxMUIxIiwidmlzaXRvcl9pZCI6IjMxMjk4MzEyOTE0NTY3NjIwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3fc471fc349bb62763b50101c89e59774a18064e6f34a4ed873e1971b6901315 |
| hovercard-subject-tag | issue:2663580161 |
| 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/245/issue_layout |
| twitter:image | https://opengraph.githubassets.com/13567048b1829ff48c2ed48f531631571f84001915ae8bfc48fafb026e792a89/python-quantities/python-quantities/issues/245 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/13567048b1829ff48c2ed48f531631571f84001915ae8bfc48fafb026e792a89/python-quantities/python-quantities/issues/245 |
| og:image:alt | If I have a quantity with a unit, e.g., t = 50 * pq.ms then t > 1 returns True whereas t.simplified > 1 returns False. Arguably, both should raise a ValueError just like t - 1 does in this example.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wagenadl |
| 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