latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.vander
- tensorplay.functional.vander(x, N=None, increasing=False) Tensor[source]
Generates a Vandermonde matrix.
The columns of the output matrix are elementwise powers of the input vector . If increasing is True, the order of the columns is reversed . Such a matrix with a geometric progression in each row is named for Alexandre-Theophile Vandermonde.
- Parameters:
- Returns:
Vandermonde matrix. If increasing is False, the first column is , the second and so forth. If increasing is True, the columns are .
- Return type:
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]])
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

