无标度#

class astropy.units.format.Unscaled(*args, **kwargs)[源代码]#

基类:Generic

自 5.3 版本弃用: 未缩放的类已弃用,可能会在将来的版本中删除。改用通用的。

不显示单位刻度部分的格式,除此之外,它与 Generic 格式。

这在一些与刻度无关的错误消息中使用。

自 5.3 版本弃用: 未缩放的类已弃用,可能会在将来的版本中删除。改用通用的。

属性摘要

name 

方法总结

to_string \(单位)

将单位转换为其字符串表示形式。

属性文档

name = 'unscaled'#

方法文件

classmethod to_string(unit)[源代码]#

将单位转换为其字符串表示形式。

实施 to_string

参数:
unitUnitBase单位

要转换的单位。

fraction{False|True|'inline'|'multiline'}, optional

选项如下:

  • False :原样具有负功率的显示单元底座(例如, km s-1 );

  • ‘inline’或 True :使用单行分数(例如, km / s );

  • “MULTINE”:使用多行分数(可用于 latexconsoleunicode 仅格式;例如, $\mathrm{\frac{km}{s}}$ )。

加薪:
ValueError

如果 fraction 不被识别。