eincheck
Tensor shape checks inspired by einstein notation
Overview
This library has three main functions:
check_shapestakes tuples of(Tensor, shape)and checks that all the Tensors match the shapes
check_shapes((x, "i 3"), (y, "i 3"))
check_funcis a function decorator to check the input and output shapes of a function
@check_func("*i x, *i y -> *i (x + y)")
def concat(a, b):
return np.concatenate([a, b], -1)
check_datais a class decorator to check the fields of a data class
@check_data(start="i 2", end="i 2")
class LineSegment2D(NamedTuple):
start: torch.Tensor
end: torch.Tensor
For more info, read the docs!
Release files for eincheck 0.6.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 | |
|---|---|---|---|
| eincheck-0.6.3.tar.gz | 13.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| eincheck-0.6.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.2 kB
Release files / eincheck-0.6.3.tar.gz
| Download URL | eincheck-0.6.3.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7feb6f418e9a082b206af577988ae82aec58a192358de298a941bb38089a05c
|
|
BLAKE2b-256 checksum How to use checksums |
83bc4c8ec0e810e9e92d435fdf09590b386ec75da58d67c89817da1f7fea681e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.9.6 Darwin/24.6.0
|
Release files / eincheck-0.6.3-py3-none-any.whl
| Download URL | eincheck-0.6.3-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ddbe8c6600c8cec1e695537ef8745afcb9bb7042022765d15306bfb88fe20e6f
|
|
BLAKE2b-256 checksum How to use checksums |
351a46433fbb465a92e15c91a417df2ba135e11869018711b8a5be3e25a83fc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.9.6 Darwin/24.6.0
|