einx
Universal Notation for Tensor Operations in Python
Decision gist · record as of 2026-08-14
Yes, if you work across multiple tensor frameworks or want a more expressive notation for complex tensor operations. The low install friction, active maintenance, MIT license, and zero known vulnerabilities make it safe to adopt. Start with the quickstart if you're unsure whether the notation fits your workflow—it's most valuable for teams managing multi-backend code or expressing operations that are verbose in native framework syntax.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Installation is straightforward with low friction—a pure Python wheel with three stable runtime dependencies (numpy, sympy, frozendict).
- The package is actively maintained with a recent release and steady commit activity.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.
last release 2026-04-01 (135 days) · last repo commit 2026-06-06 · 523 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,451,746 downloads/mo, #3,059 on PyPI
Alternatives
Verify before relying
pip install einx
import einx
import numpy as np
x = np.ones((10, 20, 30))
y = einx.sum("a [b] c", x) # Sum-reduction along second axis
print(y.shape)- Performance characteristics and compilation overhead compared to direct framework calls for simple operations.
- Completeness of operation coverage across all five supported backends (NumPy, PyTorch, JAX, TensorFlow, MLX).
- Whether custom adapters work equally well across all backends or have backend-specific limitations.
What it is and what it does
einx is a notation system and compiler that lets you write tensor operations once using a string-based syntax and run them across NumPy, PyTorch, JAX, TensorFlow, and MLX without rewriting code. The notation works by analogy to nested loops: you describe how an elementary operation (like addition or dot product) should be vectorized across tensor axes using bracket and parenthesis syntax, and einx compiles that into optimized backend-specific code.
The library supports a large set of built-in operations (reductions, scalar ops, indexing, reshaping, dot products) and also lets you wrap custom Python functions as einx operations using framework-specific adapters like vmap. It's in active development (Alpha status) with low install friction and no known security vulnerabilities.
Use it for
- Write portable tensor code that runs on NumPy for CPU prototyping and PyTorch or JAX for GPU training without duplicating logic.
- Express complex reshaping, pooling, and gather operations using a single notation instead of chaining framework-specific calls.
- Adapt custom functions (e.g., domain-specific kernels) to einx notation to gain automatic vectorization across batch and spatial dimensions.
- Compile tensor operations to inspectable code snippets for debugging or optimization verification.
- Build machine learning pipelines that can switch backends at runtime by changing only the framework import.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work across multiple tensor frameworks or want a more expressive notation for complex tensor operations.
The low install friction, active maintenance, MIT license, and zero known vulnerabilities make it safe to adopt. Start with the quickstart if you're unsure whether the notation fits your workflow—it's most valuable for teams managing multi-backend code or expressing operations that are verbose in native framework syntax.
Install
einx on PyPI
Before you install
Installation is straightforward with low friction—a pure Python wheel with three stable runtime dependencies (numpy, sympy, frozendict). The package is actively maintained with a recent release and steady commit activity.
Requires Python 3.10 or later.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.
Quickstart
pip install einx
import einx
import numpy as np
x = np.ones((10, 20, 30))
y = einx.sum("a [b] c", x) # Sum-reduction along second axis
print(y.shape)
Verify before relying
- Performance characteristics and compilation overhead compared to direct framework calls for simple operations.
- Completeness of operation coverage across all five supported backends (NumPy, PyTorch, JAX, TensorFlow, MLX).
- Whether custom adapters work equally well across all backends or have backend-specific limitations.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesnumpysympyfrozendict |
| Maintenance | Actively maintained 135 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,451,746 / month, #3,059 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersProgramming Language :: Python :: 3 |
Evidence: einx-0.4.3-py3-none-any.whl
Tags
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 operation notation”
- einxeinx provides a universal notation for expressing tensor operations…
- einshapeEinshape provides a DSL-based interface for tensor reshaping,…
- einopsEinops provides readable tensor operations (rearrange, reduce,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
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.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
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.
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.
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.
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.
See also einshape · einops · opt-einsum · einops-exts · autoray · tensordict · mlx · tensorly · tensordict-nightly · jaxtyping