Steven Rieder

Results 306 comments of Steven Rieder

This is what's happening internally: ```python In [2]: 1.0 * (kg * m) mul (kg, m) # self, other rmul (kg * m, 1.0) # self, other Out[2]: quantity In...

And ```python In [4]: 1.0 * kg**2 * m rmul (kg**2, 1.0) rmul (m, 1.0) mul (kg**2, none) rmul (kg**2, 1) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last)```

In astropy: ```python In [9]: 1.0 * u.kg**2 * u.m rmul kg2 1.0 mul m kg2 Out[9]: ```

comments are useful, I won't ignore them :)

Yes, changing the order seems to work: ```python In [12]: 3.206361533e-53 * C**3*m**3*J**-2 --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in ----> 1 3.206361533e-53 * C**3*m**3*J**-2 ~/Code/amuse/src/amuse/units/quantities.py in __mul__(self, other)...

> did you see the comment on line 87 of core? (**rmul**) yes, I think it's fixed now. Error is gone at least. edit: no, it's not

@tjardaboekholt could you have a look at this?

Just to add to that: the latter way @tjardaboekholt mentioned is the preferred method.