You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-37607: src/sage/matrix: Doctest cosmetics
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes#12345". -->
Standard reformatting of doctests and their outputs
Split out from #35095
### 📝 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.
- [ ] I have updated the documentation accordingly.
### ⌛ Dependencies
<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->
URL: #37607
Reported by: Matthias Köppe
Reviewer(s): Frédéric Chapoton
Copy file name to clipboardExpand all lines: src/sage/matrix/action.pyx
+25-10Lines changed: 25 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -19,11 +19,15 @@ Actions used by the coercion model for matrix and vector multiplications
19
19
sage: MSZ = MatrixSpace(ZZ['x'], 2)
20
20
sage: A = MSQ.get_action(MSZ)
21
21
sage: A
22
-
Left action by Full MatrixSpace of 2 by 2 dense matrices over Rational Field on Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in x over Integer Ring
22
+
Left action by Full MatrixSpace of 2 by 2 dense matrices over Rational Field
23
+
on Full MatrixSpace of 2 by 2 dense matrices
24
+
over Univariate Polynomial Ring in x over Integer Ring
23
25
sage: import gc
24
26
sage: _ = gc.collect()
25
27
sage: A
26
-
Left action by Full MatrixSpace of 2 by 2 dense matrices over Rational Field on Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in x over Integer Ring
28
+
Left action by Full MatrixSpace of 2 by 2 dense matrices over Rational Field
29
+
on Full MatrixSpace of 2 by 2 dense matrices
30
+
over Univariate Polynomial Ring in x over Integer Ring
27
31
28
32
.. NOTE::
29
33
@@ -83,13 +87,17 @@ cdef class MatrixMulAction(Action):
83
87
sage: MSQ = MatrixSpace(QQ, 2)
84
88
sage: MSZ = MatrixSpace(ZZ['x'], 2)
85
89
sage: A = MSQ.get_action(MSZ); A
86
-
Left action by Full MatrixSpace of 2 by 2 dense matrices over Rational Field on Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in x over Integer Ring
90
+
Left action by Full MatrixSpace of 2 by 2 dense matrices over Rational Field
91
+
on Full MatrixSpace of 2 by 2 dense matrices
92
+
over Univariate Polynomial Ring in x over Integer Ring
87
93
sage: A.actor()
88
94
Full MatrixSpace of 2 by 2 dense matrices over Rational Field
89
95
sage: A.domain()
90
-
Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in x over Integer Ring
96
+
Full MatrixSpace of 2 by 2 dense matrices
97
+
over Univariate Polynomial Ring in x over Integer Ring
91
98
sage: A.codomain()
92
-
Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in x over Rational Field
99
+
Full MatrixSpace of 2 by 2 dense matrices
100
+
over Univariate Polynomial Ring in x over Rational Field
93
101
"""
94
102
def__init__(self, G, S, is_left):
95
103
ifnot is_MatrixSpace(G):
@@ -130,9 +138,13 @@ cdef class MatrixMatrixAction(MatrixMulAction):
130
138
sage: MSQ = MatrixSpace(QQ, 3, 2)
131
139
sage: from sage.matrix.action import MatrixMatrixAction
132
140
sage: A = MatrixMatrixAction(MSR, MSQ); A
133
-
Left action by Full MatrixSpace of 3 by 3 dense matrices over Univariate Polynomial Ring in x over Integer Ring on Full MatrixSpace of 3 by 2 dense matrices over Rational Field
141
+
Left action
142
+
by Full MatrixSpace of 3 by 3 dense matrices
143
+
over Univariate Polynomial Ring in x over Integer Ring
144
+
on Full MatrixSpace of 3 by 2 dense matrices over Rational Field
134
145
sage: A.codomain()
135
-
Full MatrixSpace of 3 by 2 dense matrices over Univariate Polynomial Ring in x over Rational Field
146
+
Full MatrixSpace of 3 by 2 dense matrices
147
+
over Univariate Polynomial Ring in x over Rational Field
@@ -183,7 +195,8 @@ cdef class MatrixMatrixAction(MatrixMulAction):
183
195
sage: MSR = MatrixSpace(R, 3, 3)
184
196
sage: MSQ = MatrixSpace(QQ, 3, 2)
185
197
sage: A = MatrixMatrixAction(MSR, MSQ); A
186
-
Left action by Full MatrixSpace of 3 by 3 dense matrices over Univariate Polynomial Ring in x over Integer Ring on Full MatrixSpace of 3 by 2 dense matrices over Rational Field
198
+
Left action by Full MatrixSpace of 3 by 3 dense matrices over Univariate Polynomial Ring in x over Integer Ring
199
+
on Full MatrixSpace of 3 by 2 dense matrices over Rational Field
187
200
sage: A.codomain()
188
201
Full MatrixSpace of 3 by 2 dense matrices over Univariate Polynomial Ring in x over Rational Field
189
202
@@ -303,7 +316,8 @@ cdef class MatrixVectorAction(MatrixMulAction):
0 commit comments