Skip to main content

Coordinate axes for scientific computing in JAX

Project description

Coordax: Coordinate axes for scientific computing in JAX

Authors: Dmitrii Kochkov and Stephan Hoyer

Coordax makes it easy to associate array dimensions with coordinates in the context of scientific simulation codes written in JAX. This allows for efficient and expressive manipulation of data defined on structured grids, enabling operations like differentiation and interpolation with respect to physical coordinates.

Coordax was designed to meet the needs of NeuralGCM, but we hope it will be useful more broadly!

Key features

  1. Compute on locally-positional axes via coordinate map (cmap)
  2. Coordinate objects that carry discretization details and custom methods
  3. Lossless conversion to and from Xarray data structures (e.g., for serialization)

Coordax is particularly well-suited for scientific simulations where it is crucial to propagate discretization details and associated objects throughout the computation, such as Earth system modeling of fluid dynamics. The approach to labeled dimensions was originally forked from Daniel Johnson's Penzai, which may be a better fit for simpler use-cases.

Why not use Xarray?

Xarray does indeed support putting JAX arrays into Xarray data structures, an approach used by the GraphCast codebase. This works reasonably well, but wrapping JAX in Xarray will always be at least a little bit awkward, because Xarray was designed for the needs of data analysis rather than modeling, and cannot build core functionality on top of JAX power features such as vmap. For JAX-native simulations, we believe Coordax is a better choice.

Documentation and examples

Coming soon!

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

coordax-0.1.4.tar.gz (43.4 kB view details)

Uploaded Source

Built Distribution

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

coordax-0.1.4-py3-none-any.whl (49.8 kB view details)

Uploaded Python 3

File details

Details for the file coordax-0.1.4.tar.gz.

File metadata

  • Download URL: coordax-0.1.4.tar.gz
  • Upload date:
  • Size: 43.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for coordax-0.1.4.tar.gz
Algorithm Hash digest
SHA256 84a36728afa08e175a5f1d2bc54723aaa00423b0e1325fced87d4bc6276eafd9
MD5 3e8395ebe51947be0110b7bc3035cd69
BLAKE2b-256 f983966005220eb6424f1d3dda7d5d35b5a5404956ced96d39a64322771df1c5

See more details on using hashes here.

File details

Details for the file coordax-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: coordax-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 49.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for coordax-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3f6c6a0d5998578149a5761e5d2cd3e9c8da6faaf54d708056950d82aa177595
MD5 07cff01874720d6e00fd6503b2d99e28
BLAKE2b-256 a5fd7fa3fe1b9a7a2cd1e0d2a9e08069ebc6a8459caa6b7b05197196e4eb2347

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