Skip to main content

eincheck

CI Documentation Status PyPI version

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!

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)

Source distribution for eincheck 0.6.3
File Size Uploaded
eincheck-0.6.3.tar.gz 13.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eincheck 0.6.3
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.6.3 This release

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page