In-Place Operations (+=, -=, /=, *=) Yield Incorrect Units
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 in a = 0.833 * s a = a/b # results in a = 0.833 * s/kg (expected)
With:
- Python 3.13.1
- quantities 0.16.1