Stats, linear algebra and einops for xarray
Project description
xarray-einstats
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
- Documentation: https://einstats.python.arviz.org/en/latest/
- Contributing guide: https://einstats.python.arviz.org/en/latest/contributing/overview.html
- ArviZ project website: https://www.arviz.org
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
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xarray_einstats-0.9.1.tar.gz.
File metadata
- Download URL: xarray_einstats-0.9.1.tar.gz
- Upload date:
- Size: 33.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39b373deed43592c41d3fbf8863af62e19e01c1ae553ae5ff059a8df78d995c6
|
|
| MD5 |
364105a4f75030d7c3c75ea16417a533
|
|
| BLAKE2b-256 |
f110ef474494a7f2102ec4c02352c723fa282c6237b600565eb82ee354291211
|
Provenance
The following attestation bundles were made for xarray_einstats-0.9.1.tar.gz:
Publisher:
publish.yml on arviz-devs/xarray-einstats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xarray_einstats-0.9.1.tar.gz -
Subject digest:
39b373deed43592c41d3fbf8863af62e19e01c1ae553ae5ff059a8df78d995c6 - Sigstore transparency entry: 243151155
- Sigstore integration time:
-
Permalink:
arviz-devs/xarray-einstats@a545cf6c7cc5874aabc9c4f04b6234b3da791d20 -
Branch / Tag:
refs/tags/v0.9.1 - Owner: https://github.com/arviz-devs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a545cf6c7cc5874aabc9c4f04b6234b3da791d20 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xarray_einstats-0.9.1-py3-none-any.whl.
File metadata
- Download URL: xarray_einstats-0.9.1-py3-none-any.whl
- Upload date:
- Size: 39.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
777339524e85d066f2ef9ed1e3a3fb63aead4c1065fd1406f30dfa4de58ce063
|
|
| MD5 |
caae26e0fdd210ae0863c971e076412a
|
|
| BLAKE2b-256 |
178bed2f0f49385c3d7739cd4699954add26e8f09a372a0c3f04f2bde32fcea2
|
Provenance
The following attestation bundles were made for xarray_einstats-0.9.1-py3-none-any.whl:
Publisher:
publish.yml on arviz-devs/xarray-einstats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xarray_einstats-0.9.1-py3-none-any.whl -
Subject digest:
777339524e85d066f2ef9ed1e3a3fb63aead4c1065fd1406f30dfa4de58ce063 - Sigstore transparency entry: 243151163
- Sigstore integration time:
-
Permalink:
arviz-devs/xarray-einstats@a545cf6c7cc5874aabc9c4f04b6234b3da791d20 -
Branch / Tag:
refs/tags/v0.9.1 - Owner: https://github.com/arviz-devs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a545cf6c7cc5874aabc9c4f04b6234b3da791d20 -
Trigger Event:
push
-
Statement type: