This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / 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 : int

The size of the array to create.

Returns

h : (n, n) ndarray

The 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