Skip to content

Commit bb7d146

Browse files
author
Release Manager
committed
gh-36569: `sage.matrix`, `sage.modules`: Update `# needs` <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> - Cherry picked from #35095 - Part of #29705 <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [ ] 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. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36569 Reported by: Matthias Köppe Reviewer(s): David Coudert
2 parents e5b774d + c3b6f2f commit bb7d146

28 files changed

Lines changed: 401 additions & 304 deletions

src/sage/matrix/args.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,7 @@ cdef class MatrixArgs:
871871
872872
Check github issue #36065:
873873
874+
sage: # needs sage.rings.number_field
874875
sage: class MyAlgebraicNumber(sage.rings.qqbar.AlgebraicNumber):
875876
....: def __bool__(self):
876877
....: raise ValueError

src/sage/matrix/constructor.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def matrix(*args, **kwds):
580580
581581
Check :trac:`24459`::
582582
583-
sage: # needs sage.libs.flint
583+
sage: # needs sage.libs.linbox
584584
sage: Matrix(ZZ, sys.maxsize, sys.maxsize)
585585
Traceback (most recent call last):
586586
...

src/sage/matrix/matrix0.pyx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -543,11 +543,11 @@ cdef class Matrix(sage.structure.element.Matrix):
543543
544544
TESTS::
545545
546-
sage: class MyAlgebraicNumber(sage.rings.qqbar.AlgebraicNumber): # needs sage.rings.number_fields
546+
sage: class MyAlgebraicNumber(sage.rings.qqbar.AlgebraicNumber): # needs sage.rings.number_field
547547
....: def __bool__(self):
548548
....: raise ValueError
549-
sage: mat = matrix(1, 1, MyAlgebraicNumber(1)) # needs sage.rings.number_fields
550-
sage: bool(mat) # needs sage.rings.number_fields
549+
sage: mat = matrix(1, 1, MyAlgebraicNumber(1)) # needs sage.rings.number_field
550+
sage: bool(mat) # needs sage.rings.number_field
551551
Traceback (most recent call last):
552552
...
553553
ValueError
@@ -4898,7 +4898,7 @@ cdef class Matrix(sage.structure.element.Matrix):
48984898
Over finite fields::
48994899
49004900
sage: A = matrix(GF(59), 3, [10,56,39,53,56,33,58,24,55])
4901-
sage: A.multiplicative_order() # needs sage.groups
4901+
sage: A.multiplicative_order() # needs sage.libs.pari
49024902
580
49034903
sage: (A^580).is_one()
49044904
True
@@ -4918,7 +4918,7 @@ cdef class Matrix(sage.structure.element.Matrix):
49184918
Over `\ZZ`::
49194919
49204920
sage: m = matrix(ZZ, 2, 2, [-1,1,-1,0])
4921-
sage: m.multiplicative_order() # needs sage.groups
4921+
sage: m.multiplicative_order() # needs sage.libs.pari
49224922
3
49234923
49244924
sage: m = posets.ChainPoset(6).coxeter_transformation() # needs sage.combinat sage.graphs
@@ -4930,10 +4930,10 @@ cdef class Matrix(sage.structure.element.Matrix):
49304930
10
49314931
49324932
sage: M = matrix(ZZ, 2, 2, [1, 1, 0, 1])
4933-
sage: M.multiplicative_order() # needs sage.groups
4933+
sage: M.multiplicative_order() # needs sage.libs.pari
49344934
+Infinity
49354935
4936-
sage: for k in range(600): # needs sage.groups
4936+
sage: for k in range(600): # needs sage.groups sage.modular
49374937
....: m = SL2Z.random_element()
49384938
....: o = m.multiplicative_order()
49394939
....: if o != Infinity and m**o != SL2Z.one():
@@ -4948,7 +4948,7 @@ cdef class Matrix(sage.structure.element.Matrix):
49484948
....: else:
49494949
....: return ZZ.random_element(-100,100)
49504950
sage: rnd = matrix(ZZ, 8, 8, val)
4951-
sage: (rnd * m24 * rnd.inverse_of_unit()).multiplicative_order() # needs sage.groups
4951+
sage: (rnd * m24 * rnd.inverse_of_unit()).multiplicative_order() # needs sage.libs.pari
49524952
24
49534953
49544954
TESTS::
@@ -5827,9 +5827,9 @@ cdef class Matrix(sage.structure.element.Matrix):
58275827
58285828
Tests for :trac:`28570`::
58295829
5830-
sage: P = posets.TamariLattice(7) # needs sage.combinat sage.graphs
5831-
sage: M = P._hasse_diagram._leq_matrix # needs sage.combinat sage.graphs
5832-
sage: M.inverse_of_unit() # this was very slow, now 1s # needs sage.combinat sage.graphs
5830+
sage: P = posets.TamariLattice(7) # needs sage.graphs
5831+
sage: M = P._hasse_diagram._leq_matrix # needs sage.graphs
5832+
sage: M.inverse_of_unit() # this was very slow, now 1s # needs sage.graphs
58335833
429 x 429 sparse matrix over Integer Ring...
58345834
58355835
sage: m = matrix(Zmod(2**2), 1, 1, [1], sparse=True)

src/sage/matrix/matrix1.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ cdef class Matrix(Matrix0):
103103
[ [ 0, 1, 2 ], [ 3, 4, 5 ], [ 6, 7, 8 ] ]
104104
sage: g.CharacteristicPolynomial()
105105
x_1^3-12*x_1^2-18*x_1
106-
sage: A.characteristic_polynomial()
106+
sage: A.characteristic_polynomial() # needs sage.libs.pari
107107
x^3 - 12*x^2 - 18*x
108108
sage: matrix(QQ, g) == A
109109
True

0 commit comments

Comments
 (0)