Bases: astropy.units.IrreducibleUnit
A unit that did not parse correctly. This allows for roundtripping it as a string, but no unit operations actually work on it.
| Parameters: | st : str
|
|---|
Methods Summary
| get_converter(other[, equivalencies]) | Return the conversion function to convert values from self to the specified unit. |
| get_format_name(format) | Get a name for this unit that is specific to a particular format. |
| is_equivalent(other[, equivalencies]) | Returns True if this unit is equivalent to other. |
| is_unity() | Returns True if the unit is unscaled and dimensionless. |
| to_string([format]) | Output the unit in the given format as a string. |
Methods Documentation
Return the conversion function to convert values from self to the specified unit.
| Parameters: | other : unit object or string
equivalencies : list of equivalence pairs, optional
|
|---|---|
| Returns: | func : callable
|
| Raises: | UnitsError
|
Get a name for this unit that is specific to a particular format.
Uses the dictionary passed into the format kwarg in the constructor.
| Parameters: | format : str
|
|---|---|
| Returns: | name : str
|
Returns True if this unit is equivalent to other.
| Parameters: | other : unit object or string or tuple
equivalencies : list of equivalence pairs, optional
|
|---|---|
| Returns: | bool |
Returns True if the unit is unscaled and dimensionless.
Output the unit in the given format as a string.
| Parameters: | format : astropy.units.format.Base instance or str
|
|---|