Dimension of a quantity in Python language.
Project description
py-dimit
Dimension of a quantity in Python language.
Installation
$ pip install dimit
# or
$ python -m pip install dimit
Usage
from dimit import Dimension, L, M, T, DIMLESS
# L is a preset dimension for length
Dimension('L') == L
# Output: True
# Build a dimension of velocity (LT^-1).
Velocity = L / T # or L * T**-1
# or
Velocity = Dimension('LT-1')
# Output: Dimension(LT-1)
# Only support operator *, / amd **.
L*L*L == L**3
# Output: True
# Compare two dimensions
Dimension('LMT-2') == Dimension('MLT-2')
# Output: True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dimit-0.0.4.tar.gz
(39.9 kB
view hashes)
Built Distribution
dimit-0.0.4-py3-none-any.whl
(27.6 kB
view hashes)