Einop
One op to rule them all
Einop is a very thin wrapper around einops that combines rearrange, reduce, and repeat into a single einop function. This library is a port of arogozhnikov/einops#91 by Miles Cranmer into a separate library, if at some point that PR is merged use einop directly from einops instead.
Installation
pip install einop
Usage
import numpy as np
from einop import einop
x = np.random.uniform(size=(10, 20))
y = einop(x, "height width -> batch width height", batch=32)
assert y.shape == (32, 20, 10)
Rearrange
einop(x, 'i j k -> k i j').shape
>>> (3, 100, 5)
Reduction
import numpy as np
from einops import einop
x = np.random.randn(100, 5, 3)
einop(x, 'i j k -> i j', reduction='sum').shape
>>> (100, 5)
Repeat
einop(x, 'i j k -> i j k l', l=10).shape
(100, 5, 3, 10)
Metadata
Release files for einop 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| einop-0.0.1.tar.gz | 3.1 kB | Without provenance | Details for einop-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| einop-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for einop-0.0.1-py3-none-any.whl |
Total release size: 6.2 kB
Release files / einop-0.0.1.tar.gz
| Download URL | einop-0.0.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15add3732a54eb6c49618be0c59b97163e46ae87aeb5e387d9c418402ea33178
|
|
BLAKE2b-256 checksum How to use checksums |
047b99e9939fd089dff5d5f8d3030ca04b5b30a4286efd483da0f2e07a5db90e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.11 Linux/5.15.11-200.fc35.x86_64
|
Release files / einop-0.0.1-py3-none-any.whl
| Download URL | einop-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edff8c3916cf4a22eccd31254d752ec7959388bd6877eb5285eed6ca5170e36b
|
|
BLAKE2b-256 checksum How to use checksums |
c5ea45cf629f41dcbe1da97080dd254a9bf344f39baa53c72eb417666b2100bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.11 Linux/5.15.11-200.fc35.x86_64
|
Security for einop 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.