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 details)

Uploaded Source

Built Distribution

unit_propagation-0.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file unit_propagation-0.1.tar.gz.

File metadata

  • Download URL: unit_propagation-0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for unit_propagation-0.1.tar.gz
Algorithm Hash digest
SHA256 4afbc44f2697fa411fcecaedd51a6070a2f0de080e8196a0f1159069ce8b01d3
MD5 90cbd3076750005499b5592f00f3eca6
BLAKE2b-256 92e55587d458ba5baa9cc67175d9aef78a4dd0aabf8a8552c9ea22b41bb59f98

See more details on using hashes here.

File details

Details for the file unit_propagation-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for unit_propagation-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f5205517f4da2965daa3ac8c516df9c3d08f8a3719f48aa534388f75a5b5351
MD5 3432a5857cac5fa2441c092b8b36e0fe
BLAKE2b-256 7e8bc7fca9aeccfa0b7c1efd579c79f4afd077fec5d668a17d4b25d644d4e45d

See more details on using hashes here.

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