# tensorplay.functional.vander Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.vander.html ```python tensorplay.functional.vander(x, N=None, increasing=False) → Tensor ``` Generates a Vandermonde matrix. The columns of the output matrix are elementwise powers of the input vector $x^{(N-1)}, x^{(N-2)}, ..., x^0$. If increasing is True, the order of the columns is reversed $x^0, x^1, ..., x^{(N-1)}$. Such a matrix with a geometric progression in each row is named for Alexandre-Theophile Vandermonde. Parameters: - x ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – 1-D input tensor. - N ([int](https://docs.python.org/3/builtins/functions.html#int), optional) – Number of columns in the output. If N is not specified, a square array is returned $(N = len(x))$. - increasing ([bool](https://docs.python.org/3/builtins/functions.html#bool), optional) – Order of the powers of the columns. If True, the powers increase from left to right, if False (the default) they are reversed. Returns: Vandermonde matrix. If increasing is False, the first column is $x^{(N-1)}$, the second $x^{(N-2)}$ and so forth. If increasing is True, the columns are $x^0, x^1, ..., x^{(N-1)}$. Return type: [Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor) Example: ``` >>> x = tensorplay.tensor([1, 2, 3, 5]) >>> tensorplay.vander(x) tensor([[ 1, 1, 1, 1], [ 8, 4, 2, 1], [ 27, 9, 3, 1], [125, 25, 5, 1]]) >>> tensorplay.vander(x, N=3) tensor([[ 1, 1, 1], [ 4, 2, 1], [ 9, 3, 1], [25, 5, 1]]) >>> tensorplay.vander(x, N=3, increasing=True) tensor([[ 1, 1, 1], [ 1, 2, 4], [ 1, 3, 9], [ 1, 5, 25]]) ```