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: patch-diff.githubusercontent.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:45789c22-73c8-a9df-ebd1-60aacd111958 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DA94:137523:55E6DF:77B7DA:6972170A |
| html-safe-nonce | 6317c1453ce5946068996712d2fc177bababb56726051378da1755b27654b318 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTk0OjEzNzUyMzo1NUU2REY6NzdCN0RBOjY5NzIxNzBBIiwidmlzaXRvcl9pZCI6IjM2MjA3NjIzNDk3NTgxOTEzNzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | aefbe8c79e0f1df686aedf30b299fcfa5c294eaaaeb2adc7e7b441b7b17665b1 |
| 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 | 7aea209b12f15b5742ac38170cf1d21874bf205eb5ad0cac666cd92599fc4cbc |
| 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 | 3ff289e97142545d3d22ade4ca0ecba5005b7322 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width