@@ -1083,7 +1083,9 @@ def __contains__(self, x):
1083
1083
return all (xi .is_semistandard () for xi in x )
1084
1084
1085
1085
def __iter__ (self ):
1086
- """
1086
+ r"""
1087
+ Iterate over ``self``.
1088
+
1087
1089
EXAMPLES::
1088
1090
1089
1091
sage: sp = SkewPartitions(3).list()
@@ -1098,6 +1100,21 @@ def __iter__(self):
1098
1100
34
1099
1101
sage: RibbonTableaux(a,weight,k).cardinality()
1100
1102
34
1103
+
1104
+ TESTS:
1105
+
1106
+ Check that :issue:`36196` is fixed::
1107
+
1108
+ sage: shapes = [[[1], [0]], [[1], [0]], [[1], [0]]]
1109
+ sage: weight = [1, 1, 1]
1110
+ sage: SMST = SemistandardMultiSkewTableaux(shapes, weight)
1111
+ sage: list(SMST)
1112
+ [[[[1]], [[2]], [[3]]],
1113
+ [[[2]], [[1]], [[3]]],
1114
+ [[[1]], [[3]], [[2]]],
1115
+ [[[2]], [[3]], [[1]]],
1116
+ [[[3]], [[1]], [[2]]],
1117
+ [[[3]], [[2]], [[1]]]]
1101
1118
"""
1102
1119
parts = self ._shape
1103
1120
mu = self ._weight
@@ -1122,9 +1139,12 @@ def __iter__(self):
1122
1139
S = SkewTableaux ()
1123
1140
for lk in l :
1124
1141
pos = 0 # Double check this
1125
- restmp = [S .from_shape_and_word (parts [0 ], [lk [j ] for j in range (s [0 ])])]
1142
+ lk = list (lk )
1143
+ w = lk [:s [0 ]]
1144
+ restmp = [S .from_shape_and_word (parts [0 ], w )]
1126
1145
for i in range (1 , len (parts )):
1127
- w = [lk [j ] for j in range (pos + s [i - 1 ], pos + s [i - 1 ] + s [i ])]
1146
+ pos += s [i - 1 ]
1147
+ w = lk [pos : pos + s [i ]]
1128
1148
restmp .append (S .from_shape_and_word (parts [i ], w ))
1129
1149
yield self .element_class (self , restmp )
1130
1150
0 commit comments