Physics Aware Functions
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file phun-0.1.1.tar.gz
.
File metadata
- Download URL: phun-0.1.1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0732efe7c70723dafde781a168d972b14730aac33e60d59f92fb8ae366ee604 |
|
MD5 | 597d4d101249ff16ed9bcb8b6dc59ada |
|
BLAKE2b-256 | fc4d9d7941dc41818e064e3991b339c8051ffbaafc172f2f5fca550efdfeb700 |
File details
Details for the file phun-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: phun-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe9758b839b105598174964910fe23605e135455a01b435f8c9c4e6dc01a32ce |
|
MD5 | b0abf9bc974ffaca4015c9c0e6f1a11f |
|
BLAKE2b-256 | c8e2a5d450b188e4de9f0f86ec96791fff129eccad37da72957509eef9256ea5 |