invhilbert(n, exact=False)
The entries in the inverse of a Hilbert matrix are integers. When n
is greater than 14, some entries in the inverse exceed the upper limit of 64 bit integers. The :None:None:`exact`
argument provides two options for dealing with these large integers.
The order of the Hilbert matrix.
If False, the data type of the array that is returned is np.float64, and the array is an approximation of the inverse. If True, the array is the exact integer inverse array. To represent the exact inverse when n > 14, the returned array is an object array of long integers. For n <= 14, the exact inverse is returned as an array with data type np.int64.
The data type of the array is np.float64 if :None:None:`exact`
is False. If :None:None:`exact`
is True, the data type is either np.int64 (for n <= 14) or object (for n > 14). In the latter case, the objects in the array will be long integers.
Compute the inverse of the Hilbert matrix of order n
.
hilbert
Create a Hilbert matrix.
>>> from scipy.linalg import invhilbert
... invhilbert(4) array([[ 16., -120., 240., -140.], [ -120., 1200., -2700., 1680.], [ 240., -2700., 6480., -4200.], [ -140., 1680., -4200., 2800.]])
>>> invhilbert(4, exact=True) array([[ 16, -120, 240, -140], [ -120, 1200, -2700, 1680], [ 240, -2700, 6480, -4200], [ -140, 1680, -4200, 2800]], dtype=int64)
>>> invhilbert(16)[7,7] 4.2475099528537506e+19
>>> invhilbert(16, exact=True)[7,7] 42475099528537378560See :
The following pages refer to to this document either explicitly or contain code examples using this.
scipy.linalg._special_matrices.hilbert
scipy.linalg._special_matrices.invhilbert
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them