• Jason Rhinelander's avatar
    Fix /= operator under Python 3 · acad05cb
    Jason Rhinelander authored
    The Python method for /= was set as `__idiv__`, which should be
    `__itruediv__` under Python 3.
    
    This wasn't totally broken in that without it defined, Python constructs
    a new object by calling __truediv__.  The operator tests, however,
    didn't actually test the /= operator: when I added it, I saw an extra
    construction, leading to the problem.  This commit also includes tests
    for the previously untested *= operator, and adds some element-wise
    vector multiplication and division operators.
    acad05cb
test_operator_overloading.py 2.13 KB