Skip to main content

xarray-einstats

Documentation Status Run tests codecov PyPI Conda Version DOI

Stats, linear algebra and einops for xarray

Installation

To install, run

(.venv) $ pip install xarray-einstats

See the docs for more extensive install instructions.

Overview

As stated in their website:

xarray makes working with multi-dimensional labeled arrays simple, efficient and fun!

The code is often more verbose, but it is generally because it is clearer and thus less error prone and more intuitive. Here are some examples of such trade-off where we believe the increased clarity is worth the extra characters:

numpy xarray
a[2, 5] da.sel(drug="paracetamol", subject=5)
a.mean(axis=(0, 1)) da.mean(dim=("chain", "draw"))
a.reshape((-1, 10)) da.stack(sample=("chain", "draw"))
a.transpose(2, 0, 1) da.transpose("drug", "chain", "draw")

In some other cases however, using xarray can result in overly verbose code that often also becomes less clear. xarray_einstats provides wrappers around some numpy and scipy functions (mostly numpy.linalg and scipy.stats) and around einops with an api and features adapted to xarray. Continue at the getting started page.

Contributing

xarray-einstats is in active development and all types of contributions are welcome! See the contributing guide for details on how to contribute.

Relevant links

Similar projects

Here we list some similar projects we know of. Note that all of them are complementary and don't overlap:

Cite xarray-einstats

If you use this software, please cite it using the following template and the version specific DOI provided by Zenodo. Click on the badge to go to the Zenodo page and select the DOI corresponding to the version you used DOI

  • Oriol Abril-Pla. (2022). arviz-devs/xarray-einstats <version>. Zenodo. <version_doi>

or in bibtex format:

@software{xarray_einstats2022,
  author       = {Abril-Pla, Oriol},
  title        = {{xarray-einstats}},
  year         = 2022,
  url          = {https://github.com/arviz-devs/xarray-einstats}
  publisher    = {Zenodo},
  version      = {<version>},
  doi          = {<version_doi>},
}

Release files for xarray-einstats 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xarray-einstats 0.11.0
File Size Uploaded
xarray_einstats-0.11.0.tar.gz 34.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xarray-einstats 0.11.0
File Interpreter ABI Platform
xarray_einstats-0.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 74.1 kB

Release files / xarray_einstats-0.11.0.tar.gz

Download URL xarray_einstats-0.11.0.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
69f48a60f62151d40c49fd6d9a6dc0b970aecef2813a33209e4dcde897fca48b
BLAKE2b-256 checksum
How to use checksums
6f70adb14007ee636eadd2a404802f7bb340c6f123ea81cfca152ebd4b6e2660
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / xarray_einstats-0.11.0-py3-none-any.whl

Download URL xarray_einstats-0.11.0-py3-none-any.whl
Size 39.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9dc8372aeb5db233054ddde4e57cbbcd1eee6c2e1b6bbe85863881c09b4421b3
BLAKE2b-256 checksum
How to use checksums
307b34a9ce89f7a1e78423ca5a66492341c4f7daf6d0e9668af427fc2a7bc099
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.11.0 This release

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page