saiunit.DIMENSIONLESS

Contents

saiunit.DIMENSIONLESS#

saiunit.DIMENSIONLESS = Dimension()#

Store the exponents of the 7 basic SI unit dimensions.

Represents a physical dimension as a combination of the 7 SI base dimensions: length, mass, time, electric current, temperature, amount of substance, and luminous intensity.

Provides arithmetic operations appropriate to dimensions: multiplication, division, powers, and equality testing.

Parameters:

dims (sequence of float) – The exponents of the 7 basic SI unit dimensions, in order: [length, mass, time, current, temperature, substance, luminosity].

See also

get_or_create_dimension

Factory function (preferred over direct construction).

DIMENSIONLESS

Singleton for dimensionless quantities.

Notes

Users should not use this class directly. Use get_or_create_dimension instead, which ensures only one Dimension instance exists for every combination of exponents, allowing fast dimensionality checks with is.

Examples

>>> import saiunit as u
>>> length_dim = u.meter.dim
>>> length_dim.get_dimension('m')
1.0
>>> length_dim.is_dimensionless
False
>>> u.DIMENSIONLESS.is_dimensionless
True