Skip to content

jitfields.splinc

spline_coeff

spline_coeff(inp, order, bound='dct2', dim=-1)

Compute the interpolating spline coefficients, along a single dimension.

Parameters:

Name Type Description Default
inp `tensor`

Input tensor

required
order `{0..7}`

Interpolation order.

2
bound `BoundType`

Boundary conditions.

'dct2'
dim `int`

Dimension along which to filter

-1

Returns:

Name Type Description
coeff `tensor`

Spline coefficients

spline_coeff_

spline_coeff_(inp, order, bound='dct2', dim=-1)

Compute the interpolating spline coefficients, along a single dimension.

Notes

This function operates inplace.

Parameters:

Name Type Description Default
inp `tensor`

Input tensor

required
order `{0..7}`

Interpolation order.

2
bound `BoundType`

Boundary conditions.

'dct2'
dim `int`

Dimension along which to filter

-1

Returns:

Name Type Description
coeff `tensor`

Spline coefficients

spline_coeff_nd

spline_coeff_nd(inp, order, bound='dct2', ndim=None)

Compute the interpolating spline coefficients, along the last N dimensions.

Parameters:

Name Type Description Default
inp `(..., *spatial) tensor`

Input tensor, with shape (..., *spatial).

required
order `[sequence of] {0..7}`

Interpolation order (per dimension).

2
bound `[sequence of] BoundType`

Boundary conditions (per dimension).

'dct2'
ndim `int`

Number of spatial dimensions. Defaults: all.

`inp.dim()`

Returns:

Name Type Description
coeff `(..., *spatial) tensor`

Spline coefficients, with shape (..., *spatial).

spline_coeff_nd_

spline_coeff_nd_(inp, order, bound='dct2', ndim=None)

Compute the interpolating spline coefficients, along the last N dimensions.

Notes

This function operates inplace.

Parameters:

Name Type Description Default
inp `(..., *spatial) tensor`

Input tensor, with shape (..., *spatial).

required
order `[sequence of] {0..7}`

Interpolation order (per dimension).

2
bound `[sequence of] BoundType`

Boundary conditions (per dimension).

'dct2'
ndim `int`

Number of spatial dimensions. Defaults: all.

`inp.dim()`

Returns:

Name Type Description
coeff `(..., *spatial) tensor`

Spline coefficients, with shape (..., *spatial).