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.3.tar.gz (42.3 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.3-py3-none-any.whl (48.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coordax-0.1.3.tar.gz
  • Upload date:
  • Size: 42.3 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.3.tar.gz
Algorithm Hash digest
SHA256 5d0b5662037ac558dd5c083d5bd92e7ce68b47f524b3242b72f6ebea1beebaaf
MD5 a71753b369c3a9fd7d64e7bcb05a2929
BLAKE2b-256 af84a71e1823987923e4941c66eae00a3e608852d541f758f4e196da11d1ac13

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coordax-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 48.8 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f2ccd7a697631d220e42f1ae3cd636e41a0451541c6b680a79250ef4893f1cf9
MD5 0b9d78b62626445bcf6d0312f78cdc30
BLAKE2b-256 11a691510e5dab040084be1e023bff86601353b66b26a9e71f39e3c3c4d84a34

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