cfunits.Units.isdimensionless

Units.isdimensionless

True if the units are dimensionless, false otherwise.

Examples

>>> Units('').isdimensionless
True
>>> Units('1').isdimensionless
True
>>> Units('100').isdimensionless
True
>>> Units('m/m').isdimensionless
True
>>> Units('m km-1').isdimensionless
True
>>> Units().isdimensionless
False
>>> Units('m').isdimensionless
False
>>> Units('m/s').isdimensionless
False
>>> Units('days since 2000-1-1', calendar='noleap').isdimensionless
False