VOUnit#
- class astropy.units.format.VOUnit(*args, **kwargs)[source]#
- Bases: - Generic- The IVOA standard for units used by the VO. - This is an implementation of Units in the VO 1.0. - Attributes Summary - Methods Summary - format_exponential_notation(val[, format_spec])- Formats a value in exponential notation. - parse(s[, debug])- Convert a string to a unit object. - to_string(unit[, fraction])- Convert a unit to its string representation. - Attributes Documentation - name = 'vounit'#
 - Methods Documentation - classmethod format_exponential_notation(val, format_spec='.8g')[source]#
- Formats a value in exponential notation. 
 - classmethod to_string(unit, fraction=False)[source]#
- Convert a unit to its string representation. - Implementation for - to_string.- Parameters:
- unitUnitBase
- The unit to convert. 
- fraction{False|True|’inline’|’multiline’}, optional
- Options are as follows: 
 
- unit
- Raises:
- ValueError
- If - fractionis not recognized.