eincheck-0.1.3
توضیحات
Tensor shape checks inspired by einstein notation
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | eincheck-0.1.3 |
| نام | eincheck |
| نسخه کتابخانه | 0.1.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Ethan Pronovost |
| ایمیل نویسنده | epronovo1@gmail.com |
| آدرس صفحه اصلی | https://github.com/EPronovost/eincheck |
| آدرس اینترنتی | https://pypi.org/project/eincheck/ |
| مجوز | MIT |
# eincheck
[](https://github.com/epronovost/eincheck/actions/workflows/pr.yaml)
[](https://eincheck.readthedocs.io/en/main/?badge=main)
[](https://badge.fury.io/py/eincheck)
Tensor shape checks inspired by einstein notation
## Overview
This library has three main functions:
* `check_shapes` takes tuples of `(Tensor, shape)` and checks that all the Tensors match the shapes
```
check_shapes((x, "i 3"), (y, "i 3"))
```
* `check_func` is 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_data` is 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!](https://eincheck.readthedocs.io/en/main)
نیازمندی
| مقدار | نام |
|---|---|
| >=1.1,<1.2 | lark |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8.1,<4 | Python |
نحوه نصب
نصب پکیج whl eincheck-0.1.3:
pip install eincheck-0.1.3.whl
نصب پکیج tar.gz eincheck-0.1.3:
pip install eincheck-0.1.3.tar.gz