Tensor operation library using Einstein-inspired notation
Top 74.7% on sourcepulse
einx is a Python library providing a unified interface for tensor operations across NumPy, PyTorch, JAX, and TensorFlow, using an Einstein-inspired notation. It aims to simplify complex tensor manipulations, particularly for neural network development, by offering a consistent and composable syntax for operations like summation, reshaping, and matrix multiplication.
How It Works
einx employs a novel notation inspired by einops but introduces bracket notation and full composability for a universal tensor language. Operations are defined using this notation, which is then just-in-time compiled into optimized backend-specific Python functions using exec()
. This approach allows for seamless integration with existing codebases and efficient execution by reducing overhead through caching.
Quick Start & Requirements
pip install einx
Highlighted Details
Maintenance & Community
einx
team.Licensing & Compatibility
Limitations & Caveats
exec()
for JIT compilation, which might have security implications in untrusted environments.3 months ago
1 day