Vander
vander(x, N=None, increasing=FALSE) -> Tensor
Generates a Vandermonde matrix.
The columns of the output matrix are elementwise powers of the input vector
Examples
if (torch_is_installed()) {
x <- torch_tensor(c(1, 2, 3, 5))
torch_vander(x)
torch_vander(x, N=3)
torch_vander(x, N=3, increasing=TRUE)
}
#> torch_tensor
#> 1 1 1
#> 1 2 4
#> 1 3 9
#> 1 5 25
#> [ CPUFloatType{4,3} ]