SI unit system implementation enabling physical quantity math


Keywords
matplotlib, numpy, python, si-unit-system
License
MIT
Install
pip install unit-system==1.1.7

Documentation

Build Status Code Coverage Version

unit_system

The unit_system package provides a way to do physical quantity math in Python that replicates Mathcad's unit system. The implementation conforms to the SI standard.

Installation

$ pip install unit_system

Usage

>>> from unit_system import Quantity
>>> V = Quantity(1, "V")
>>> A = Quantity(1, "A")
>>> 1*V / (1*A)
1.0 Ω

You can load predefined units like the ones in Mathcad.

>>> from unit_system import *
>>> 1*mΩ * 1*A
0.001 V

Documentation

https://l-johnston.github.io/unit_system/