Skip to main content

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.

Metadata

Release files for phun 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phun 0.1.2
File Size Uploaded
phun-0.1.2.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for phun 0.1.2
File Interpreter ABI Platform
phun-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / phun-0.1.2.tar.gz

Download URL phun-0.1.2.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f2d8718b71783e133b9921a5b684b64475fca294da469c70b076c0caf17c3aa4
BLAKE2b-256 checksum
How to use checksums
c41448988d8200267701864dccbe064e6ff424a186a21481d18de564ac774b8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / phun-0.1.2-py3-none-any.whl

Download URL phun-0.1.2-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
571d2949934d16ec4ce01041dacdd66fd44462d80264a7b10497d5d0b01d9a94
BLAKE2b-256 checksum
How to use checksums
1a5357fa60238f2ee6688f2d0b1c5a86825c508ed7bb5a2a887b16aebf814599
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page