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.5.tar.gz (45.9 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.5-py3-none-any.whl (52.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coordax-0.1.5.tar.gz
  • Upload date:
  • Size: 45.9 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.5.tar.gz
Algorithm Hash digest
SHA256 43b9f335cd8cf73a18dc948639d26104441c52d36158d8f5057fe521590dbb84
MD5 9eae2888bbf219b7c0b2601a7afa620b
BLAKE2b-256 23ae925b54dfb865c4cb9f5f9cf3abdeb08bc05faa521cee5b314d4b27b5c259

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coordax-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 52.2 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8d0ac89023d828eeb1c7e88646c91bc9639f8507fd5ed3c848bb8f55444ac56d
MD5 c27944f4d258824bc829f6996cc37f9b
BLAKE2b-256 0013607339ba1b2a943b124357a54fea0dbf307d2376cb77f3598691f71a8f25

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