Skip to main content

Physics Aware Functions

Project description

LT Docs PyPI

Phun: Physics Aware Functions

Writing physics functions is non-trivial. Although each physical quantity can be expressed in different units, in computation physics, it is common to require the inputs of a physics function in a pre-determined unit system. This makes reusing these physics functions in different fields challenging. Astropy provides a powerful units sub-module to partially solve this problem. However, it introduces a special Quantity class, which makes it incompatible with other high performance packages such as JAX.

Phun solves this problem by enabling both writing physics functions with astropy.units and currying these functions into pure functions that can jax.jit. Phun provides a standard pattern to implement these functions, as well as python decorator to transform these physics functions. Phun makes writing JAX compatible physics aware functions easier.

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

phun-0.1.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phun-0.1.2-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file phun-0.1.2.tar.gz.

File metadata

  • Download URL: phun-0.1.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for phun-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f2d8718b71783e133b9921a5b684b64475fca294da469c70b076c0caf17c3aa4
MD5 22a835cafce2bfdd3f6e8c4695ffce07
BLAKE2b-256 c41448988d8200267701864dccbe064e6ff424a186a21481d18de564ac774b8e

See more details on using hashes here.

File details

Details for the file phun-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: phun-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for phun-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 571d2949934d16ec4ce01041dacdd66fd44462d80264a7b10497d5d0b01d9a94
MD5 1973abf129da05e4d6ba7ccac494c521
BLAKE2b-256 1a5357fa60238f2ee6688f2d0b1c5a86825c508ed7bb5a2a887b16aebf814599

See more details on using hashes here.

Supported by

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