astropy:docs

IrreducibleUnit

class astropy.units.IrreducibleUnit[source] [edit on github]

Bases: astropy.units.NamedUnit

Irreducible units are the units that all other units are defined in terms of.

Examples are meters, seconds, kilograms, amperes, etc. There is only once instance of such a unit per type.

Methods Summary

decompose([bases]) Return a unit object composed of only irreducible units.

Methods Documentation

decompose(bases=set([]))[source] [edit on github]

Return a unit object composed of only irreducible units.

Parameters:

bases : sequence of UnitBase, optional

The bases to decompose into. When not provided, decomposes down to any irreducible units. When provided, the decomposed result will only contain the given units. This will raises a UnitsError if it’s not possible to do so.

Returns:

unit : CompositeUnit object

New object containing only irreducible unit objects.

Page Contents