Skip to content

Commit bc3f671

Browse files
author
Release Manager
committed
sagemathgh-39974: Fix test failure in doctest of rank method Failure seen in https://github.com/sagemath/sage/pull/39725/files#annotation_33948370801 . It can be computed that the probability of failure is ≈ 1/16007, which is tiny but still can happen if there is a sufficiently large number of pull requests the code being ran on. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39974 Reported by: user202729 Reviewer(s):
2 parents 1aaa979 + 7c26184 commit bc3f671

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sage/matrix/matrix_modn_dense_template.pxi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,10 @@ cdef class Matrix_modn_dense_template(Matrix_dense):
21362136
::
21372137
21382138
sage: # needs sage.rings.finite_rings
2139-
sage: A = random_matrix(GF(16007), 100, 100)
2139+
sage: while True:
2140+
....: A = random_matrix(GF(16007), 100, 100)
2141+
....: if A.rank() == 100:
2142+
....: break
21402143
sage: B = copy(A)
21412144
sage: A.rank()
21422145
100

0 commit comments

Comments
 (0)