# vander¶

paddle. vander ( x, n=None, increasing=False, name=None ) [source]

Generate a Vandermonde matrix.

The columns of the output matrix are powers of the input vector. Order of the powers is determined by the increasing Boolean parameter. Specifically, when the increment is “false”, the ith output column is a step-up in the order of the elements of the input vector to the N - i - 1 power. Such a matrix with a geometric progression in each row is named after Alexandre-Theophile Vandermonde.

Parameters
• x (Tensor) – The input tensor, it must be 1-D Tensor, and it’s data type should be [‘complex64’, ‘complex128’, ‘float32’, ‘float64’, ‘int32’, ‘int64’].

• n (int) – Number of columns in the output. If n is not specified, a square array is returned (n = len(x)).

• increasing (bool) – Order of the powers of the columns. If True, the powers increase from left to right, if False (the default) they are reversed.

• name (str, optional) – For details, please refer to Name. Generally, no setting is required. Default: None.

Returns

Tensor, A vandermonde matrix with shape (len(x), N). 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)}\).

Examples

```>>> import paddle
>>> x = paddle.to_tensor([1., 2., 3.], dtype="float32")
>>> out
[[1., 1., 1.],
[4., 2., 1.],
[9., 3., 1.]])
>>> out1
[[1., 1.],
[2., 1.],
[3., 1.]])
>>> out2 = paddle.vander(x, increasing = True)
>>> out2