Skip to content

Commit df955bf

Browse files
committed
quotes around algo names; remove useless print's
1 parent e117e39 commit df955bf

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/sage/matrix/matrix_polynomial_dense.pyx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4098,12 +4098,12 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
40984098
40994099
sage: ring.<x> = GF(7)[]
41004100
sage: mat = matrix([[x*(x-1)*(x-2), (x-2)*(x-3)*(x-4), (x-4)*(x-5)*(x-6)]])
4101-
sage: print(mat)
4101+
sage: mat
41024102
[ x^3 + 4*x^2 + 2*x x^3 + 5*x^2 + 5*x + 4 x^3 + 6*x^2 + 4*x + 6]
4103-
sage: rcomp = mat._basis_completion_via_reversed_approx(); print(rcomp)
4103+
sage: rcomp = mat._basis_completion_via_reversed_approx(); rcomp
41044104
[ 5*x^2 + 4*x + 1 5*x^2 + 2*x 5*x^2]
41054105
[ 2*x^3 + 4*x^2 2*x^3 + 6*x^2 + 2*x + 1 2*x^3 + x^2 + 3*x]
4106-
sage: basis = mat.stack(rcomp); print(basis)
4106+
sage: basis = mat.stack(rcomp); basis
41074107
[ x^3 + 4*x^2 + 2*x x^3 + 5*x^2 + 5*x + 4 x^3 + 6*x^2 + 4*x + 6]
41084108
[ 5*x^2 + 4*x + 1 5*x^2 + 2*x 5*x^2]
41094109
[ 2*x^3 + 4*x^2 2*x^3 + 6*x^2 + 2*x + 1 2*x^3 + x^2 + 3*x]
@@ -4116,7 +4116,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
41164116
sage: mat = matrix(ring, 2, 3, \
41174117
[[x^2 + 5*x + 5, 3*x^2 + x + 3, 4*x^2 + 5*x + 4], \
41184118
[5*x^2 + 4*x, 3*x^2 + 4*x + 5, 5*x^2 + 5*x + 3]])
4119-
sage: rcomp = mat._basis_completion_via_reversed_approx(); print(rcomp)
4119+
sage: rcomp = mat._basis_completion_via_reversed_approx(); rcomp
41204120
[ 2*x^2 + 1 4*x^2 + 3*x 2*x^2 + 3*x]
41214121
sage: mat.stack(rcomp).determinant()
41224122
3
@@ -4133,9 +4133,9 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
41334133
[x + 3 0]
41344134
[ 0 0]
41354135
[ 0 0]
4136-
sage: rcomp = mat._basis_completion_via_reversed_approx(); print(rcomp)
4136+
sage: rcomp = mat._basis_completion_via_reversed_approx(); rcomp
41374137
[x + 1 2*x]
4138-
sage: ccomp = mat.transpose()._basis_completion_via_reversed_approx().transpose(); print(ccomp)
4138+
sage: ccomp = mat.transpose()._basis_completion_via_reversed_approx().transpose(); ccomp
41394139
[3*x + 1 4*x + 4]
41404140
[ 2*x 5*x + 1]
41414141
[ 6*x x]
@@ -4282,9 +4282,9 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
42824282
- ``row_wise`` -- (optional, default: ``True``) boolean, if ``True`` then
42834283
compute a row-wise completion, else compute a column-wise completion.
42844284
4285-
- ``algorithm`` -- (optional, default: ``approximant``) selects the
4285+
- ``algorithm`` -- (optional, default: ``"approximant"``) selects the
42864286
approach for computing the completion; currently supported:
4287-
``approximant`` and ``smith``.
4287+
``"approximant"`` and ``"smith"``.
42884288
42894289
OUTPUT: a matrix over the same base ring as the input matrix, which forms a
42904290
completion as defined above.
@@ -4307,12 +4307,12 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
43074307
43084308
sage: ring.<x> = GF(7)[]
43094309
sage: mat = matrix([[x*(x-1)*(x-2), (x-2)*(x-3)*(x-4), (x-4)*(x-5)*(x-6)]])
4310-
sage: print(mat)
4310+
sage: mat
43114311
[ x^3 + 4*x^2 + 2*x x^3 + 5*x^2 + 5*x + 4 x^3 + 6*x^2 + 4*x + 6]
4312-
sage: rcomp = mat.basis_completion(); print(rcomp)
4312+
sage: rcomp = mat.basis_completion(); rcomp
43134313
[ 5*x^2 + 4*x + 1 5*x^2 + 2*x 5*x^2]
43144314
[ 2*x^3 + 4*x^2 2*x^3 + 6*x^2 + 2*x + 1 2*x^3 + x^2 + 3*x]
4315-
sage: basis = mat.stack(rcomp); print(basis)
4315+
sage: basis = mat.stack(rcomp); basis
43164316
[ x^3 + 4*x^2 + 2*x x^3 + 5*x^2 + 5*x + 4 x^3 + 6*x^2 + 4*x + 6]
43174317
[ 5*x^2 + 4*x + 1 5*x^2 + 2*x 5*x^2]
43184318
[ 2*x^3 + 4*x^2 2*x^3 + 6*x^2 + 2*x + 1 2*x^3 + x^2 + 3*x]
@@ -4326,11 +4326,11 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
43264326
sage: mat = matrix(ring, 2, 3, \
43274327
[[x^2 + 5*x + 5, 3*x^2 + x + 3, 4*x^2 + 5*x + 4], \
43284328
[5*x^2 + 4*x, 3*x^2 + 4*x + 5, 5*x^2 + 5*x + 3]])
4329-
sage: rcomp = mat.basis_completion(); print(rcomp)
4329+
sage: rcomp = mat.basis_completion(); rcomp
43304330
[ 2*x^2 + 1 4*x^2 + 3*x 2*x^2 + 3*x]
43314331
sage: mat.stack(rcomp).determinant()
43324332
3
4333-
sage: print(mat.basis_completion(row_wise=False))
4333+
sage: mat.basis_completion(row_wise=False)
43344334
[]
43354335
43364336
The following matrix has rank 1 and its nonzero Smith factor is `x+3`.
@@ -4345,9 +4345,9 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
43454345
[x + 3 0]
43464346
[ 0 0]
43474347
[ 0 0]
4348-
sage: rcomp = mat.basis_completion(); print(rcomp)
4348+
sage: rcomp = mat.basis_completion(); rcomp
43494349
[x + 1 2*x]
4350-
sage: ccomp = mat.basis_completion(row_wise=False); print(ccomp)
4350+
sage: ccomp = mat.basis_completion(row_wise=False); ccomp
43514351
[3*x + 1 4*x + 4]
43524352
[ 2*x 5*x + 1]
43534353
[ 6*x x]
@@ -4506,7 +4506,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
45064506
False
45074507
45084508
sage: zero_mat = matrix(ring, 2, 2)
4509-
sage: comp = zero_mat.basis_completion(); print(comp)
4509+
sage: comp = zero_mat.basis_completion(); comp
45104510
[1 0]
45114511
[0 1]
45124512
sage: comp._is_basis_completion(zero_mat, row_wise=True)

0 commit comments

Comments
 (0)