Skip to content

Commit acf6736

Browse files
authored
DOC: linalg.matrix_balance: move math to notes; ensure that it renders (scipy#22140)
1 parent 2d30141 commit acf6736

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

scipy/linalg/_basic.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,15 +1728,6 @@ def matrix_balance(A, permute=True, scale=True, separate=False,
17281728
triangular parts of the matrix and, again if scaling is also enabled,
17291729
only the remaining subblocks are subjected to scaling.
17301730
1731-
The balanced matrix satisfies the following equality
1732-
1733-
.. math::
1734-
1735-
B = T^{-1} A T
1736-
1737-
The scaling coefficients are approximated to the nearest power of 2
1738-
to avoid round-off errors.
1739-
17401731
Parameters
17411732
----------
17421733
A : (n, n) array_like
@@ -1769,6 +1760,14 @@ def matrix_balance(A, permute=True, scale=True, separate=False,
17691760
17701761
Notes
17711762
-----
1763+
The balanced matrix satisfies the following equality
1764+
1765+
.. math::
1766+
B = T^{-1} A T
1767+
1768+
The scaling coefficients are approximated to the nearest power of 2
1769+
to avoid round-off errors.
1770+
17721771
This algorithm is particularly useful for eigenvalue and matrix
17731772
decompositions and in many cases it is already called by various
17741773
LAPACK routines.

0 commit comments

Comments
 (0)