torch-bounds
Boundary conditions (circulant, mirror, reflect) and real transforms (DCT, DST) in PyTorch.
Overview
This small package implements a wide range of boundary conditions used to extrapolate a given discrete signal outside of its native bounds.
Based on these additional boundary conditions, it implements:
It also implements discrete
sine and cosine transforms
(variants 1, 2 and 3), using a trick similar to cupy.
Finally, it implements additional utilities:
ensure_shapecrops or pads a tensor (with any boundary condition) so that it matches a give shape.indexingis a module that implements functions to tranforms out-of-bounds coordinates into in-bounds coordinates according to any boundary condition.typesis a module that defines names and aliases for different boundary conditions, as well as tools to convert between different naming conventions.
Documentation
See our documentation and notebooks.
Installation
Dependency
torch >= 1.3torch >= 1.8if real transforms are needed (dct, dst)
Conda
conda install torch-bounds -c balbasty -c pytorch
Pip
pip install torch-bounds
Related packages
torch-interpol: B-spline interpolation with the same boundary conditions as those implemented here.torch-distmap: Euclidean distance transform.
Metadata
Release files for torch-bounds 0.2.0
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 |
|---|---|---|---|---|
| torch_bounds-0.2.0.tar.gz | 42.7 kB | Without provenance | Details for torch_bounds-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| torch_bounds-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for torch_bounds-0.2.0-py3-none-any.whl |
Total release size: 68.8 kB
Release files / torch_bounds-0.2.0.tar.gz
| Download URL | torch_bounds-0.2.0.tar.gz |
|---|---|
| Size | 42.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
731835f9f150486f221984d4ac048ce0df721e3e3f7d455f43ceab917990a699
|
|
BLAKE2b-256 checksum How to use checksums |
5cd743bb22df5cb664632207c8b1e58a18884c79542da36d0107042fba5ed10a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / torch_bounds-0.2.0-py3-none-any.whl
| Download URL | torch_bounds-0.2.0-py3-none-any.whl |
|---|---|
| Size | 26.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4975ba7b9eef746fd716b15493b5e6360217233fcd80de127dfdd7da1bdfb97a
|
|
BLAKE2b-256 checksum How to use checksums |
f02cbde84551a94a2a90d9695cee0e09e23d4521a09888bea4cc6ec8cc6dbb61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for torch-bounds 0.2.0
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.