bundles / scipy latest / scipy / linalg / _special_matrices / helmert
function
scipy.linalg._special_matrices:helmert
source: build-install/usr/lib/python3.14/site-packages/scipy/linalg/_special_matrices.py:512
Signature
def helmert(n, full = False)Summary
Create a Helmert matrix of order n.
Extended Summary
This has applications in statistics, compositional or simplicial analysis, and in Aitchison geometry.
Parameters
n: intThe size of the array to create.
full: bool, optionalIf True the (n, n) ndarray will be returned. Otherwise the submatrix that does not include the first row will be returned. Default: False.
Returns
M: ndarrayThe Helmert matrix. The shape is (n, n) or (n-1, n) depending on the
fullargument.
Examples
from scipy.linalg import helmert
✓helmert(5, full=True)
✗array([[ 0.45, 0.45, 0.45, 0.45, 0.45],
[ 0.71, -0.71, 0. , 0. , 0. ],
[ 0.41, 0.41, -0.82, 0. , 0. ],
[ 0.29, 0.29, 0.29, -0.87, 0. ],
[ 0.22, 0.22, 0.22, 0.22, -0.89]])
Aliases
scipy.linalg.helmert