scipy.linalg.hilbert

scipy.linalg.hilbert(n)

Create a Hilbert matrix of order n.

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 : ndarray with shape (n, n)

The Hilber matrix.

Notes

New in version 0.10.0.

Examples

>>> hilbert(3)
array([[ 1.        ,  0.5       ,  0.33333333],
       [ 0.5       ,  0.33333333,  0.25      ],
       [ 0.33333333,  0.25      ,  0.2       ]])

Previous topic

scipy.linalg.hankel

Next topic

scipy.linalg.invhilbert

This Page