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.10.0.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xarray_einstats-0.10.0-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file xarray_einstats-0.10.0.tar.gz.

File metadata

  • Download URL: xarray_einstats-0.10.0.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xarray_einstats-0.10.0.tar.gz
Algorithm Hash digest
SHA256 d432a363fc8f09baad164f9826dc711551c684b9abd8098c1b961d18663a627d
MD5 d3f9df44630328a2773fe5f184c6c164
BLAKE2b-256 489b305ee6a2dac75fc9c28105db061408df6ecbf0f7a1de37636e8e4ea47ca7

See more details on using hashes here.

Provenance

The following attestation bundles were made for xarray_einstats-0.10.0.tar.gz:

Publisher: publish.yml on arviz-devs/xarray-einstats

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for xarray_einstats-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa3169b46cee29092db820d8bbc203148bada4fc970ee75e62cbf3dd7c5a8945
MD5 437df0a9bd56425e987cedfdaee002c2
BLAKE2b-256 19d4225027a913621a879b429a043674aa35220e6ce67785acad4f7bd0c4ff33

See more details on using hashes here.

Provenance

The following attestation bundles were made for xarray_einstats-0.10.0-py3-none-any.whl:

Publisher: publish.yml on arviz-devs/xarray-einstats

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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