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.2.tar.gz (42.2 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.2-py3-none-any.whl (48.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for coordax-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2fe6296fdd0acc69ebf5bdd4b129c36fcf8db7fc234ea734045f4ff79e751570
MD5 b7bb58a32b0ccb79c7cd7437d21a6718
BLAKE2b-256 162ae966e842fae12d57b08a893a3ce14cc2aa600fdef032405d8343efc2f721

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for coordax-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4ade11e0aebf9d824ee16ae6eefcf00e1a66626a617d133c08e71756331ac76
MD5 234e4a464795f37c4841273741cbb484
BLAKE2b-256 830c213ef67ede5c0a9aa1421a659fd0b09b867db3f113013c00b957d3097d72

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