sponge.function.Length

View Source On Gitee
class sponge.function.Length(value: float, unit: str = 'nm', **kwargs)[source]

Length.

Parameters
  • value (float) – length value.

  • unit (str) – length value unit. Default: 'nm'

  • kwargs – other arguments.

Supported Platforms:

Ascend GPU CPU

property abs_size: float

absolute size of length.

Returns

float, the absolute size of length.

change_unit(unit)[source]

change unit.

Parameters

unit (Union[str, Units, float, int]) – Energy unit.

property ref: float

reference value.

Returns

float, a reference value.

property unit: str

length unit.

Returns

str, the length unit.

property unit_name: str

name of length unit.

Returns

str, the name of length unit.

property value: float

value of length.

Returns

float, the value of length.