$npx skillfedfor your agent

einshape

DSL-based reshaping library for JAX and other frameworks

With conditionsPyPI Scientific/EngineeringReleased Dec 2022533.2K downloads / moApache 2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — einshape-1.0-py3-none-any.whl
v1.0 · released 2022-12-19 · 3 runtime deps: absl-py, numpy, dataclasses

Yes, if you perform frequent tensor reshaping and want more readable transformation code. The DSL is expressive and reduces boilerplate. However, maintenance is dormant (last release 2022-12-19); verify compatibility with your framework version before adopting in production. For occasional reshaping, native operations may be simpler.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • A compatible tensor framework (JAX or TensorFlow) must be installed separately; einshape does not declare either as a dependency to remain framework-agnostic.
  • Low friction installation with a pure-Python wheel.
  • Maintenance is dormant—last release was 2022-12-19 with no updates since, though the repository remains active with a recent commit on 2024-06-25.

License · maintenance · safety

Apache 2.0 (permissive) — Apache 2.0 is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute the package freely provided you include the license notice.

last release 2022-12-19 (1334 days) · last repo commit 2024-06-25 · 111 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 533,200 downloads/mo, #6,142 on PyPI

Verify before relying

from einshape import jax_einshape as einshape
import numpy as np

a = np.array([[1, 2], [3, 4]])
b = einshape("ij->(ij)", a)
# b is [1, 2, 3, 4]
  • Whether the dormant maintenance status affects compatibility with recent framework releases.
  • Performance characteristics compared to native reshape and transpose operations.
  • Full scope of equation syntax support beyond the documented examples.
Same gist for agents: .md · .json

What it is and what it does

Einshape is a DSL-based tensor manipulation library that unifies reshape, squeeze, expand_dims, and transpose operations under a single Einstein-notation-inspired syntax. Instead of chaining multiple function calls or computing permutation indices, you write compact equations like "nhwc->nchw" to transpose or "(mn)hwc->mnhwc" to split dimensions, making complex tensor transformations more readable and less error-prone.

The library works across multiple frameworks by exposing both a high-level API for each and a lower-level parser and engine for custom implementations. It supports advanced features like ellipsis (...) for variable-rank tensors, grouping syntax for dimension factorization, and unit dimensions for squeeze and expand operations. You supply dimension sizes via keyword arguments when they cannot be inferred from the equation.

Use it for

  • Reorder tensor axes for model input formats without manually computing permutation indices.
  • Reshape batch and feature dimensions in a single readable operation instead of chained calls.
  • Expand or squeeze unit dimensions using compact notation rather than repeated function calls.
  • Split or combine dimensions with automatic size inference from keyword arguments.
  • Write framework-agnostic tensor transformation code using the parser and engine.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you perform frequent tensor reshaping and want more readable transformation code.

The DSL is expressive and reduces boilerplate. However, maintenance is dormant (last release 2022-12-19); verify compatibility with your framework version before adopting in production. For occasional reshaping, native operations may be simpler.

Install

einshape on PyPI

Before you install

Low friction installation with a pure-Python wheel. Maintenance is dormant—last release was 2022-12-19 with no updates since, though the repository remains active with a recent commit on 2024-06-25.

A compatible tensor framework (JAX or TensorFlow) must be installed separately; einshape does not declare either as a dependency to remain framework-agnostic.

License in practice

Apache 2.0 is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute the package freely provided you include the license notice.

Quickstart

from einshape import jax_einshape as einshape
import numpy as np

a = np.array([[1, 2], [3, 4]])
b = einshape("ij->(ij)", a)
# b is [1, 2, 3, 4]

Verify before relying

  • Whether the dormant maintenance status affects compatibility with recent framework releases.
  • Performance characteristics compared to native reshape and transpose operations.
  • Full scope of equation syntax support beyond the documented examples.

Package facts

LicenseApache 2.0 permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
absl-pynumpydataclasses
MaintenanceDormant 1,334 days since the last release
Last repo commit
First released
Downloads533,200 / month, #6,142 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: einshape-1.0-py3-none-any.whl

Tags

Capabilities
tensor reshape DSLeinsum-style reshapearray reshaping notationeinshape equationsbatch dimension manipulationtensor axis operations
Topics
tensor-manipulationdsl

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “tensor reshape DSL”

  • einshapeEinshape provides a DSL-based interface for tensor reshaping,…
  • einopsEinops provides readable tensor operations (rearrange, reduce,…
  • nvidia-cutlass-dsl-libs-cu12Provides a Python DSL for writing high-performance CUDA kernels using…

Give your agent the search over MCP, or paste the wish link into any chat.

More Scientific/Engineering packages

numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
pandas Worth it
PyPI · Scientific/Engineering · released Jul 2026

pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.

BSD-3-Clausecompiled wheel · 3.11+
769.1Mdownloads / mo
scipy Worth it
PyPI · Libraries · released Jun 2026

scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.

BSD-3-Clausecompiled wheel · 3.12+
449.0Mdownloads / mo
scikit-learn Worth it
PyPI · Software Development · released Jun 2026

scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.

Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.

BSD-3-Clausecompiled wheel · 3.11+
235.5Mdownloads / mo
dill Worth it
PyPI · Software Development · released Jan 2026

dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.

BSD-3-Clausepure Python · 3.9+
208.1Mdownloads / mo
multiprocess Worth it
PyPI · Software Development · released Jan 2026

Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.

Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.

BSD-3-Clausepure Python · 3.9+
202.7Mdownloads / mo

See also einx · jaxtyping · einops · diffrax · tensordict · transformations · tensordict-nightly · tensorly · einops-exts · fast-array-utils