Title: Improved behavior of comparison between quantities by wagenadl · Pull Request #249 · python-quantities/python-quantities · GitHub
Open Graph Title: Improved behavior of comparison between quantities by wagenadl · Pull Request #249 · python-quantities/python-quantities
X Title: Improved behavior of comparison between quantities by wagenadl · Pull Request #249 · python-quantities/python-quantities
Description: For quantities A and B of unequal dimensionality, the == operator now returns an array of the same shape that numpy would return if A and B were different and filled with False. In particular, if both A and B are scalar arrays, the result is a scalar False. Previously, a scalar array (np.array(False)) would be returned under these circumstances. If A and B do not have compatible sizes, an exception is generated. The != operator behaves the same except that it fills the result with True values. The other comparison operators now raise exceptions if a quantity that is not dimensionless is compared to a plain number. For effectively dimensionless quantities the comparison is now consistent. Previously, if n = pq.s * pq.kHz then n < 2 would return True but n.simplified < 2 would return False. Now, both return False. Comparison between incompatible quantities raises exceptions as before. Closes #245
Open Graph Description: For quantities A and B of unequal dimensionality, the == operator now returns an array of the same shape that numpy would return if A and B were different and filled with False. In particular, if b...
X Description: For quantities A and B of unequal dimensionality, the == operator now returns an array of the same shape that numpy would return if A and B were different and filled with False. In particular, if b...
Opengraph URL: https://github.com/python-quantities/python-quantities/pull/249
X: @github
Domain: www.github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:263cd8c4-f594-524d-1aec-4cfab1d9b99c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 86F6:3A6082:1D43907:2625AF6:696B423B |
| html-safe-nonce | 6ffa5993a55506ee5f49f133fe6badedf76f8355de101a479e43578a7f644950 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkY2OjNBNjA4MjoxRDQzOTA3OjI2MjVBRjY6Njk2QjQyM0IiLCJ2aXNpdG9yX2lkIjoiNjgzNDEyMDM1MjIwNDUzODQyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6dd045e63c796be7482d7fdc2c3e58b6c96629dbd2e48958cc1d5daac886c1a7 |
| hovercard-subject-tag | pull_request:2182934378 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python-quantities/python-quantities/pull/249/files |
| twitter:image | https://avatars.githubusercontent.com/u/11696507?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/11696507?s=400&v=4 |
| og:image:alt | For quantities A and B of unequal dimensionality, the == operator now returns an array of the same shape that numpy would return if A and B were different and filled with False. In particular, if b... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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