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: patch-diff.githubusercontent.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:e85293c5-1f25-6319-1efb-4b1d549e084f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB5A:1AD267:3563576:48E24FD:6972C9E7 |
| html-safe-nonce | c792591b48c2cd50ce7a1c98fe66589dc2a4ce7a2527cbd72ae2b69020d878a9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjVBOjFBRDI2NzozNTYzNTc2OjQ4RTI0RkQ6Njk3MkM5RTciLCJ2aXNpdG9yX2lkIjoiNjQ2NzA0MzE1OTcwNjg4MDQ4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 01fe9036c31bab5d708f951e0994def027df673c35f3bf1fc2016ca8361c43c0 |
| 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 | aa656e37a6f46b81c2416d9c983f7c54e264ee31be17c0e6c9414b9f9f9c6eb4 |
| 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 | add6bd61de5b348d2978a698a5796a7d0438e7be |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width