bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / linalg / _special_matrices / hilbert
function
scipy.linalg._special_matrices:hilbert
source: build-install/usr/lib/python3.14/site-packages/scipy/linalg/_special_matrices.py:557
Signature
def hilbert(n)Summary
Create a Hilbert matrix of order n.
Extended Summary
Returns the n by n array with entries h[i,j] = 1 / (i + j + 1).
Parameters
n: intThe size of the array to create.
Returns
h: (n, n) ndarrayThe Hilbert matrix.
Notes
Examples
from scipy.linalg import hilbert
✓hilbert(3)
✗array([[1. , 0.5 , 0.33],
[0.5 , 0.33, 0.25],
[0.33, 0.25, 0.2 ]])
See also
- invhilbert
Compute the inverse of a Hilbert matrix.
Aliases
scipy.linalg.hilbert