We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7812951 commit 1711cdcCopy full SHA for 1711cdc
src/sage/combinat/tuple.py
@@ -182,6 +182,18 @@ def unrank(self, i):
182
sage: T[0]
183
(1, 1, 1, 1, 1)
184
185
+ Verify that :meth:`unrank` gives the correct answer when `k = 0`::
186
+
187
+ sage: T = Tuples(range(6), 0)
188
+ sage: list(T)
189
+ [()]
190
+ sage: T[0]
191
+ ()
192
+ sage: T[1]
193
+ Traceback (most recent call last):
194
+ ...
195
+ IndexError: index i (=1) is greater than or equal to the cardinality
196
197
Verify that :issue:`39534` has been fixed::
198
199
sage: T = Tuples(range(3), 30).random_element()
0 commit comments