Skip to main content

Physics Aware Functions

Project description

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.1.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

phun-0.1.1-py3-none-any.whl (8.8 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