Skip to main content

Simple, readable Einstein Summation in Python.

Project description

Einsum

Simple, readable Einstein Summation in Python.

# Install
pip install python-einsum

Simple Example

from einsum import Einsum
import numpy as np

tensorAb = np.ones((2, 3))  # ab
tensorBd = np.ones((3, 4))  # bd
tensorDc = np.ones((4, 5))  # dc
einsumOp = Einsum("(ab,(bd,dc->bc)->ac)", tensorAb, tensorBd, tensorDc)

Features

  • Easy to Read and Understand
  • Supports a variety of Notations

Development

# Clone and install
git clone https://github.com/guilt/einsum
cd einsum
pip install -e ".[dev]"

# Run tests
python -m unittest discover tests/ -v

License

MIT License. See License for details.

Feedback

Made with ❤️ by Vibe coding.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_einsum-0.0.1.tar.gz (14.1 kB view details)

Uploaded Source

File details

Details for the file python_einsum-0.0.1.tar.gz.

File metadata

  • Download URL: python_einsum-0.0.1.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for python_einsum-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6c0bee375acf3bce9907f99cdae8071280132ba6a0a25316e4b14f84db32eb5e
MD5 9ab45f12394353289a31a32fa9803445
BLAKE2b-256 56c0a70cb4490bfce8e49c931ba8e0ac431890aa0a0163457c55066d55a983a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page