cf.Units.isdimensionless

Units.isdimensionless

True if the units are dimensionless, false otherwise.

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

Previous topic

cf.Units.calendar

Next topic

cf.Units.islatitude

This Page