Title: In-Place Operations (+=, -=, /=, *=) Yield Incorrect Units · Issue #254 · python-quantities/python-quantities · GitHub
Open Graph Title: In-Place Operations (+=, -=, /=, *=) Yield Incorrect Units · Issue #254 · python-quantities/python-quantities
X Title: In-Place Operations (+=, -=, /=, *=) Yield Incorrect Units · Issue #254 · python-quantities/python-quantities
Description: While migrating Elephant to numpy >= 2.0 we discovered the following bug, where in place basic operations +=, -=, /= and *= result in incorrect units. Minimal example to reproduce: a = 5 * pq.s b = 6 * pq.kg a /= b # results incorrectly ...
Open Graph Description: While migrating Elephant to numpy >= 2.0 we discovered the following bug, where in place basic operations +=, -=, /= and *= result in incorrect units. Minimal example to reproduce: a = 5 * pq.s b =...
X Description: While migrating Elephant to numpy >= 2.0 we discovered the following bug, where in place basic operations +=, -=, /= and *= result in incorrect units. Minimal example to reproduce: a = 5 * pq.s ...
Opengraph URL: https://github.com/python-quantities/python-quantities/issues/254
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"In-Place Operations (+=, -=, /=, *=) Yield Incorrect Units","articleBody":"While migrating Elephant to numpy \u003e= 2.0 we discovered the following bug, where in place basic operations +=, -=, /= and *= result in incorrect units.\n\nMinimal example to reproduce:\n```python\na = 5 * pq.s\nb = 6 * pq.kg\n\na /= b # results incorrectly in a = 0.833 * s\n\na = a/b # results in a = 0.833 * s/kg (expected)\n```\n\nWith:\n- Python 3.13.1\n- quantities 0.16.1\n","author":{"url":"https://github.com/Moritz-Alexander-Kern","@type":"Person","name":"Moritz-Alexander-Kern"},"datePublished":"2025-02-24T11:21:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/254/python-quantities/issues/254"}
| 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:d7ded4c1-ff31-4a9d-3065-e4bb3f069338 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D390:F5661:BF9371:106F6D5:696A8AEC |
| html-safe-nonce | 580d4b931e71e54980a16bc965b206504d72a9d96232aae134e49415a8baf9d6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzkwOkY1NjYxOkJGOTM3MToxMDZGNkQ1OjY5NkE4QUVDIiwidmlzaXRvcl9pZCI6IjQxNDI3OTc3MDE2ODc5NzA1NDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e3b310594533c8bcf078f53948740c3878f5781f71c4e45916109d13ce311e74 |
| hovercard-subject-tag | issue:2874635449 |
| 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/254/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ef62a22da373acb49d7125b699547e18a20d8309d3ec70bfc60c346e21a9fe28/python-quantities/python-quantities/issues/254 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ef62a22da373acb49d7125b699547e18a20d8309d3ec70bfc60c346e21a9fe28/python-quantities/python-quantities/issues/254 |
| og:image:alt | While migrating Elephant to numpy >= 2.0 we discovered the following bug, where in place basic operations +=, -=, /= and *= result in incorrect units. Minimal example to reproduce: a = 5 * pq.s b =... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Moritz-Alexander-Kern |
| hostname | github.com |
| expected-hostname | github.com |
| None | d2aa6dedd7d97fa651b17c40401f2605f309df5ca5fb659bf0554cf34f1de825 |
| 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 | c1dbca8981c5e3d6a69bce2f1d289e732b86241d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width