--- id: xarray-einstats version: "0.11.0" license: unclear license_treatment: permissive maintenance: active --- # xarray-einstats — Stats, linear algebra and einops for xarray License: permissive · Maintenance: active · Downloads: 2.2M/mo ## What it is and what it does xarray-einstats bridges the gap between xarray's labeled array clarity and NumPy/SciPy's functional depth. When xarray operations become verbose or when you need linear algebra or statistical functions, this package provides thin wrappers that preserve dimension names and coordinate information instead of forcing you back to positional indexing. It wraps numpy.linalg and scipy.stats functions, plus einops tensor operations, with an API designed for xarray's labeled semantics. The package targets scientific and statistical workflows where you work with multi-dimensional data and want to perform matrix operations or statistical tests without losing your dimension labels. It's in active development (Alpha status) and maintained as part of the ArviZ ecosystem. Use it for: - Compute matrix decompositions on xarray variables while preserving dimension names - Apply scipy.stats functions to labeled multi-dimensional arrays without reshaping to NumPy - Reshape and transpose xarray data using einops syntax adapted for labeled dimensions - Perform linear algebra on Bayesian posterior samples organized by chain and draw dimensions - Stack or reshape dimensions in scientific datasets while maintaining coordinate metadata ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides xarray-friendly wrappers around NumPy linear algebra, SciPy statistics, and einops operations, reducing verbosity while preserving labeled array semantics. Yes, if you regularly work with xarray and need NumPy linear algebra or SciPy statistics without losing dimension labels. Low install friction, active maintenance, permissive license, and no known vulnerabilities. Alpha status means the API may evolve, but it's suitable for workflows where clarity and labeled semantics matter more than API stability guarantees. ## Install pip install xarray-einstats uv add xarray-einstats poetry add xarray-einstats ## Installing xarray-einstats Before you install: Low friction: pure Python wheel with only three runtime dependencies (numpy, scipy, xarray). Last release 25 days ago; repository active with recent commits. License in practice: Permissive license allows commercial and private use with minimal restrictions. Quickstart: pip install xarray-einstats import xarray as xr import xarray_einstats # Use wrapped functions on xarray DataArrays da = xr.DataArray(...) result = xarray_einstats.linalg.svd(da) Requires Python 3.12 or later. Verify before relying: - Whether einops is an optional or required transitive dependency (not listed in runtime deps) - Scope and maturity of scipy.stats wrapper coverage - Performance characteristics vs. direct numpy/scipy calls ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags xarray linear algebra wrappers, einops for xarray, scipy stats with xarray, numpy linalg xarray, labeled array operations, xarray matrix operations, scientific computing xarray, xarray-extension, scientific-computing, bayesian-inference [View on SkillFed](https://skillfed.io/packages/xarray-einstats) · [View on PyPI](https://pypi.org/project/xarray-einstats/)