Skip to content

fiery.bounds

Modules:

Name Description
indexing

Functions that wrap out-of-bound indices back in-bounds, according to some boundary condition.

padding

Reimplements torch.nn.functional.pad and torch.roll with a larger set of boundary conditions.

realtransforms

Implements the discrete sine and cosine transforms, variants I, II, III.

types

Defines names and aliases for different boundary conditions, as well as tools to convert between different naming conventions.

Functions:

Name Description
pad

Pad a tensor

roll

Roll a tensor

ensure_shape

Pad/crop a tensor so that it has a given shape

to_enum

Convert any boundary type to BoundType

to_int

Convert any boundary type to BoundType-based integer values

to_fourier

Convert any boundary type to discrete transforms

to_scipy

Convert any boundary type to scipy.ndimage convention

to_torch

Convert any boundary type to torch.grid_sample convention

dct

One-dimensional Discrete Cosine Transform (DCT)

dst

One-dimensional Discrete Sine Transform (DST)

idct

One-dimensional Inverse Discrete Cosine Transform (DCT)

idst

One-dimensional Inverse Discrete Sine Transform (DST)

dctn

N-dimensional Discrete Cosine Transform (DCT)

dstn

N-dimensional Discrete Sine Transform (DST)

idctn

N-dimensional Inverse Discrete Cosine Transform (IDCT)

idstn

N-dimensional Inverse Discrete Sine Transform (IDST)

Classes:

Name Description
BoundType

Enum type for bounds

Attributes:

Name Type Description
BoundLike

A type hint for any boundary type

SequenceOrScalar

A type hint for values or sequences of values