Bases: astropy.units.UnitBase
Create a composite unit using expressions of previously defined units.
Direct use of this class is not recommended. Instead use the factory function Unit and arithmetic operators to compose units.
| Parameters: | scale : number
bases : sequence of UnitBase
powers : sequence of numbers
|
|---|
Attributes Summary
| bases | Return the bases of the composite unit. |
| powers | Return the powers of the composite unit. |
| scale | Return the scale of the composite unit. |
Methods Summary
| decompose([bases]) | Return a unit object composed of only irreducible units. |
| is_unity() | Returns True if the unit is unscaled and dimensionless. |
Attributes Documentation
Return the bases of the composite unit.
Return the powers of the composite unit.
Return the scale of the composite unit.
Methods Documentation
Return a unit object composed of only irreducible units.
| Parameters: | bases : sequence of UnitBase, optional
|
|---|---|
| Returns: | unit : CompositeUnit object
|
Returns True if the unit is unscaled and dimensionless.