Skip to main content

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


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.5.tar.gz (40.0 kB view hashes)

Uploaded Source

Built Distribution

dimit-0.0.5-py3-none-any.whl (27.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page