Return True if and only if numeric values in one unit are convertible to numeric values in the other unit and their conversion is a scale factor of 1.
Parameters : |
|
---|---|
Returns : |
|
See also
Examples
>>> u = Units('km')
>>> v = Units('1000m')
>>> w = Units('100000m')
>>> u.equals(v)
True
>>> u.equals(w)
False
>>> u = Units('m s-1')
>>> m = Units('m')
>>> s = Units('s')
>>> u.equals(m)
False
>>> u.equals(m/s)
True
>>> (m/s).equals(u)
True
Undefined units are considered equal:
>>> u = Units()
>>> v = Units()
>>> u.equals(v)
True