[SciPy-dev] Hilbert-matrix

Stéfan van der Walt stefan@sun.ac...
Wed May 20 18:44:19 CDT 2009

Hi all,

The Ill-conditioned Hilbert-matrix is often studied by students in
numerical linear algebra, and as such I thought it might deserve a
place in scipy.linalg.

def hilbert(N):
    x, y = np.ogrid[1.:N+1, 1.:N+1]
    return 1 / (x + y - 1)

The trickier issue, however, would be calculating the inverse -- does
anybody have suggestions on how to implement it accurately?  Ideally,
we would have made use of Python's very long integers, but that would
mean saving the array with dtype object.


More information about the Scipy-dev mailing list