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)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fancy_einsum-0.0.3.tar.gz
(4.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fancy_einsum-0.0.3.tar.gz.
File metadata
- Download URL: fancy_einsum-0.0.3.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05ca6689999d0949bdaa5320c81117effa13644ec68a200121e93d7ebf3d3356
|
|
| MD5 |
68c9756be5f784b6d483051217ea2973
|
|
| BLAKE2b-256 |
b9b1f5a13cdc05b9a16502d760ead310a689a1538f3fee9618b92011200b9717
|
File details
Details for the file fancy_einsum-0.0.3-py3-none-any.whl.
File metadata
- Download URL: fancy_einsum-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0bf33587a61822b0668512ada237a0ffa5662adfb9acfcbb0356ee15a0396a1
|
|
| MD5 |
dc3d6479cd4a10dd6e23ba3212660cff
|
|
| BLAKE2b-256 |
271426fc262ba70976eea9a42e67b05c67aa78a0ee38332d9d094cca5d2c5ec3
|