Skip to main content

vander

Function vander 

Source
pub fn vander<T>(
    x: &Array<T, Ix1>,
    n: Option<usize>,
    increasing: bool,
) -> FerrayResult<Array<T, IxDyn>>
where T: Element + Mul<Output = T> + Copy,
Expand description

Generate a Vandermonde matrix.

Each row is a geometric progression of the corresponding x element. n is the number of columns (None => x.len()). When increasing is false (numpy default), columns are powers in decreasing order x[i]^(n-1-j). When true, they are increasing: x[i]^j.

Analogous to numpy.vander(x, N=n, increasing=...).

ยงErrors

Returns FerrayError::InvalidValue if x is empty.