Skip to content

Numpyro Extras

FillTriangularTransform

Bases: Transform

Transform that maps a vector of length n(n+1)/2 to an n x n lower triangular matrix. The ordering is assumed to be: (0,0), (1,0), (1,1), (2,0), (2,1), (2,2), ..., (n-1, n-1)

__call__

__call__(x)

Forward transformation.

Parameters

x : array_like, shape (..., L) Input vector with L = n(n+1)/2 for some integer n.

Returns

y : array_like, shape (..., n, n) Lower-triangular matrix (with zeros in the upper triangle) filled in row-major order (i.e. [ (0,0), (1,0), (1,1), ... ]).