◐ Shell
clean mode source ↗

Comparison between quantities and plain numbers is inconsistent and unsafe

If I have a quantity with a unit, e.g.,

 t = 50 * pq.ms

then

t > 1

returns True whereas

t.simplified > 1

returns False. Arguably, both should raise a ValueError just like

t - 1

does in this example.

If the community agrees, I would be happy to prepare a pull request to change the behavior.