PrefixableUnit

Labs

class PrefixableUnit

Description

A unit that can be prefixed.

This is a trivial child of Unit to clarify which interfaces expect PrefixableUnit, and which do not.

Inheritance:

Members inherited from Unit (22 members)

factor

R

Factor to scale the quantity by relative to type.

is_prefixable

R

Whether this unit can be prefixed.

is_prefixed

R

Whether this unit is prefixed.

kind

R

Quantity metadata of this unit.

name

R

Name given to this unit.

prefix

R

Prefix associated with this unit.

reference_unit

R

Unit this is a (named) reference of.

symbol

R

Symbol given to this unit.

zero

R

Value of the type when this is equal to 0.0.

__hash__

__repr__

__str__

as_prefixable

Convert this unit to prefixable.

base

Expression of this units as its base units.

convertible_from

Whether other unit is convertible to this, i.e. whether their types are equal.

from_absolute_base

Convert absolute base value to this unit’s absolute numerical representation.

from_relative_base

Convert base value relative to some origin to this unit’s numerical representation relative to the same origin.

named

Find or create a new base unit for kind.

one

Get a dimensionless unit one

prefixed

Find or create a new prefixed unit.

to_absolute_base

Convert absolute value to absolute base units numerically.

to_relative_base

Convert value relative to some origin to base units relative to the same origin numerically.