Skip to content

Commit 3b7c431

Browse files
committed
Trac #21325 review comment 13: use .linear representation in examples partial_sum
1 parent 5b2fb5c commit 3b7c431

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

src/sage/combinat/k_regular_sequence.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -646,19 +646,25 @@ def partial_sums(self, include_n=False):
646646
647647
TESTS::
648648
649-
sage: E.mu[0], E.mu[1], E.left, E.right
650-
(
651-
[0 1] [0 0]
652-
[0 1], [0 1], (1, 0), (1, 1)
653-
)
649+
sage: E.linear_representation()
650+
((1, 0),
651+
Finite family {0: [0 1]
652+
[0 1],
653+
1: [0 0]
654+
[0 1]},
655+
(1, 1))
654656
sage: P = E.partial_sums(minimize=False)
655-
sage: P.mu[0], P.mu[1], P.left, P.right
656-
(
657-
[ 0 1 0 0] [0 1 0 0]
658-
[ 0 2 0 -1] [0 2 0 0]
659-
[ 0 0 0 1] [0 0 0 0]
660-
[ 0 0 0 1], [0 0 0 1], (1, 0, -1, 0), (1, 1, 1, 1)
661-
)
657+
sage: P.linear_representation()
658+
((1, 0, -1, 0),
659+
Finite family {0: [ 0 1 0 0]
660+
[ 0 2 0 -1]
661+
[ 0 0 0 1]
662+
[ 0 0 0 1],
663+
1: [0 1 0 0]
664+
[0 2 0 0]
665+
[0 0 0 0]
666+
[0 0 0 1]},
667+
(1, 1, 1, 1))
662668
"""
663669
from sage.matrix.constructor import Matrix
664670
from sage.matrix.special import zero_matrix

0 commit comments

Comments
 (0)