pyxx.units.UnitSystem#

class pyxx.units.UnitSystem(num_base_units: int, name: str | None = None, description: str | None = None)#

Bases: object

Base class representing a system of units

This class can be used to represent a system of units with an arbitrary number of base units. For more information about systems of units and unit conversions, refer to the Unit Conversion Concepts section of the documentation.

Methods

__init__(num_base_units[, name, description])

Creates an instance of the UnitSystem class

Attributes

description

A brief description of the system of units, such as a list of the base units or details on other relevant specifications

name

A short, descriptive name identifying the system of units

num_base_units

The number of base units in the system of units

__init__(num_base_units: int, name: str | None = None, description: str | None = None)#

Creates an instance of the UnitSystem class

Creates a system of units, assigning the number of base units (which cannot be changed later) and optionally an identifying name and description.

Parameters:
  • num_base_units (int) – The number of base units in the system of units

  • name (str, optional) – A short, descriptive name of the system of units (default is None)

  • description (str, optional) – A description of the system of units (default is None)

property description#

A brief description of the system of units, such as a list of the base units or details on other relevant specifications

property name#

A short, descriptive name identifying the system of units

property num_base_units#

The number of base units in the system of units