Permalink
Browse files

BUG: linalg: fixed mistake in eig_banded and eigvals_banded docstring…

…s (ticket #1560).  Made some additional docstring changes to be more consistent with variable names.
  • Loading branch information...
1 parent badad3f commit fc1dc719ae064bc4f16ef00eae59585af4e683f2 @WarrenWeckesser WarrenWeckesser committed Nov 19, 2011
Showing with 16 additions and 12 deletions.
  1. +16 −12 scipy/linalg/decomp.py
View
@@ -390,13 +390,15 @@ def eig_banded(a_band, lower=False, eigvals_only=False, overwrite_a_band=False,
a v[:,i] = w[i] v[:,i]
v.H v = identity
- The matrix a is stored in ab either in lower diagonal or upper
+ The matrix a is stored in a_band either in lower diagonal or upper
diagonal ordered form:
- ab[u + i - j, j] == a[i,j] (if upper form; i <= j)
- ab[ i - j, j] == a[i,j] (if lower form; i >= j)
+ a_band[u + i - j, j] == a[i,j] (if upper form; i <= j)
+ a_band[ i - j, j] == a[i,j] (if lower form; i >= j)
- Example of ab (shape of a is (6,6), u=2)::
+ where u is the number of bands above the diagonal.
+
+ Example of a_band (shape of a is (6,6), u=2)::
upper form:
* * a02 a13 a24 a35
@@ -412,8 +414,8 @@ def eig_banded(a_band, lower=False, eigvals_only=False, overwrite_a_band=False,
Parameters
----------
- a_band : array, shape (M, u+1)
- Banded matrix whose eigenvalues to calculate
+ a_band : array, shape (u+1, M)
+ The bands of the M by M matrix a.
lower : boolean
Is the matrix in the lower form. (Default is upper form)
eigvals_only : boolean
@@ -637,13 +639,15 @@ def eigvals_banded(a_band, lower=False, overwrite_a_band=False,
a v[:,i] = w[i] v[:,i]
v.H v = identity
- The matrix a is stored in ab either in lower diagonal or upper
+ The matrix a is stored in a_band either in lower diagonal or upper
diagonal ordered form:
- ab[u + i - j, j] == a[i,j] (if upper form; i <= j)
- ab[ i - j, j] == a[i,j] (if lower form; i >= j)
+ a_band[u + i - j, j] == a[i,j] (if upper form; i <= j)
+ a_band[ i - j, j] == a[i,j] (if lower form; i >= j)
+
+ where u is the number of bands above the diagonal.
- Example of ab (shape of a is (6,6), u=2)::
+ Example of a_band (shape of a is (6,6), u=2)::
upper form:
* * a02 a13 a24 a35
@@ -659,8 +663,8 @@ def eigvals_banded(a_band, lower=False, overwrite_a_band=False,
Parameters
----------
- a_band : array, shape (M, u+1)
- Banded matrix whose eigenvalues to calculate
+ a_band : array, shape (u+1, M)
+ The bands of the M by M matrix a.
lower : boolean
Is the matrix in the lower form. (Default is upper form)
overwrite_a_band:

0 comments on commit fc1dc71

Please sign in to comment.