Fancy Einsum
This is a simple wrapper around np.einsum and torch.einsum that allows the use of self-documenting variable names instead of just single letters in the equations. Inspired by the syntax in einops.
For example, instead of writing:
import torch
torch.einsum('bct,bcs->bcts', a, b)
or
import numpy as np
np.einsum('bct,bcs->bcts', a, b)
With this library you can write:
from fancy_einsum import einsum
einsum('batch channels time1, batch channels time2 -> batch channels time1 time2', a, b)
Metadata
Release files for fancy-einsum 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fancy_einsum-0.0.3.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fancy_einsum-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.2 kB
Release files / fancy_einsum-0.0.3.tar.gz
| Download URL | fancy_einsum-0.0.3.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05ca6689999d0949bdaa5320c81117effa13644ec68a200121e93d7ebf3d3356
|
|
BLAKE2b-256 checksum How to use checksums |
b9b1f5a13cdc05b9a16502d760ead310a689a1538f3fee9618b92011200b9717
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.10.0 keyring/23.4.0 rfc3986/1.5.0 colorama/0.4.3 CPython/3.9.7
|
Release files / fancy_einsum-0.0.3-py3-none-any.whl
| Download URL | fancy_einsum-0.0.3-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0bf33587a61822b0668512ada237a0ffa5662adfb9acfcbb0356ee15a0396a1
|
|
BLAKE2b-256 checksum How to use checksums |
271426fc262ba70976eea9a42e67b05c67aa78a0ee38332d9d094cca5d2c5ec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.10.0 keyring/23.4.0 rfc3986/1.5.0 colorama/0.4.3 CPython/3.9.7
|