基地#
- class astropy.units.format.Base(*args, **kwargs)[源代码]#
基类:
object
所有单元格式的抽象基类。
属性摘要
方法总结
format_exponential_notation
(val[, format_spec])将值格式化为指数表示法。
parse
\(s)将字符串转换为单位对象。
to_string
(unit, *[, fraction])将单位转换为其字符串表示形式。
属性文档
- registry = {'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'>, 'unscaled': <class 'astropy.units.format.generic.Unscaled'>, 'vounit': <class 'astropy.units.format.vounit.VOUnit'>}#
方法文件
- classmethod to_string(unit, *, fraction=True)[源代码]#
将单位转换为其字符串表示形式。
实施
to_string
。- 参数:
- 加薪:
ValueError
如果
fraction
不被识别。