Skip to main content

physical quantities (numbers with units)

Project description

Author: Ken Kundert
Version: 0.1
Released: 2024-03-01

This is a package used to experiment with adding unit propagation to QuantiPhy. It currently employs simple-minded simplification rules that are relatively easy to fool. Also, there is a strong emphasis on simple electrical unit scenarios. Even so, it shows promise for use in well controlled settings.

Here is simple example:

from unit_propagation import (
    UnitPropagatingQuantity as Quantity, QuantiPhyError
)
try:
    v = Quantity("2.5V")
    i = Quantity("100nA")
    print(v/i)
except QuantiPhyError as e:
    print(f"error: {e!s}")

Included in the package is a simple RPN calculator that allows you to explore the capabilities and limitation of the unit propagation.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unit_propagation-0.1.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

unit_propagation-0.1-py3-none-any.whl (4.9 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