Skip to main content

Stats, linear algebra and einops for xarray

Project description

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>},
}

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

xarray-einstats-0.5.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

xarray_einstats-0.5.0-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file xarray-einstats-0.5.0.tar.gz.

File metadata

  • Download URL: xarray-einstats-0.5.0.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for xarray-einstats-0.5.0.tar.gz
Algorithm Hash digest
SHA256 3f799ead32bb28ce4e9b3cf95c2daa9c2040f06b25a34f8f2cd303f0268445ed
MD5 ded1af3ace235f344def10a34f9396e0
BLAKE2b-256 1d4c8e9b7625075698725bb17463bdd8a61841c1d3eae421926f05fc8ccd432d

See more details on using hashes here.

File details

Details for the file xarray_einstats-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for xarray_einstats-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72383da0b19c1a7024c5703e1fe5b0efcfc7349fdd2e75cfa7fa3141fd6aff1e
MD5 b6c632368b4d88214fe4781aff5a1107
BLAKE2b-256 18deecc5d49b2ca6969163f5ec26ca6620057a5e0447b7356e434406d289a9c4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page