Skip to content

Commit 13d74a3

Browse files
author
Noel Roemmele
committed
24801 Updated documentation of random_diagonalizable_matrix.
1 parent d954f1d commit 13d74a3

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/sage/matrix/special.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -3054,15 +3054,15 @@ def random_diagonalizable_matrix(parent, eigenvalues=None, dimensions=None):
30543054
"""
30553055
Create a random matrix that diagonalizes nicely.
30563056
3057-
To be used as a teaching tool. Return matrices have only real
3058-
eigenvalues.
3057+
To be used as a teaching tool. If the ring used is QQ then return matrices
3058+
have real eigenvalues. Otherwise eignevalues are elements of the ring.
30593059
30603060
INPUT:
30613061
30623062
If eigenvalues and dimensions are not specified in a list,
30633063
they will be assigned randomly.
30643064
3065-
- ``parent`` -- the desired size of the square matrix
3065+
- ``parent`` -- the matrix space required
30663066
30673067
- ``eigenvalues`` -- the list of desired eigenvalues (default=None)
30683068
@@ -3071,9 +3071,10 @@ def random_diagonalizable_matrix(parent, eigenvalues=None, dimensions=None):
30713071
30723072
OUTPUT:
30733073
3074-
A square, diagonalizable, matrix with only integer entries. The
3075-
eigenspaces of this matrix, if computed by hand, give basis
3076-
vectors with only integer entries.
3074+
A square, diagonalizable, matrix. If the ring used is QQ then we have
3075+
integer entries. Otherwise entries are elements of the ring. If the
3076+
ring used is QQ the eigenspaces of this matrix, if computed by hand,
3077+
give basis vectors with only integer entries.
30773078
30783079
.. NOTE::
30793080
@@ -3120,7 +3121,7 @@ def random_diagonalizable_matrix(parent, eigenvalues=None, dimensions=None):
31203121
31213122
TESTS:
31223123
3123-
Eigenvalues must all be integers. ::
3124+
Eigenvalues must all be elements of the ring. ::
31243125
31253126
sage: random_matrix(QQ, 3, algorithm='diagonalizable', # needs sage.symbolic
31263127
....: eigenvalues=[2+I, 2-I, 2], dimensions=[1,1,1])

0 commit comments

Comments
 (0)