基地#
- class astropy.units.format.Base(*args, **kwargs)[源代码]#
基类:
object所有单元格式的抽象基类。
属性摘要
方法总结
format_exponential_notation(val[, format_spec])将值格式化为指数表示法。
parse\(s)将字符串转换为单位对象。
to_string(unit, *[, fraction])将单位转换为其字符串表示形式。
属性文档
- registry: ClassVar[dict[str, type[Base]]] = {'cds': <class 'astropy.units.format.cds.CDS'>, 'console': <class 'astropy.units.format.console.Console'>, 'fits': <class 'astropy.units.format.fits.FITS'>, 'generic': <class 'astropy.units.format.generic.Generic'>, 'latex': <class 'astropy.units.format.latex.Latex'>, 'latex_inline': <class 'astropy.units.format.latex.LatexInline'>, 'ogip': <class 'astropy.units.format.ogip.OGIP'>, 'unicode': <class 'astropy.units.format.unicode_format.Unicode'>, 'vounit': <class 'astropy.units.format.vounit.VOUnit'>}#
方法文件
- classmethod format_exponential_notation(val: UnitScale | np.number, format_spec: str = '.8g') str[源代码]#
将值格式化为指数表示法。