Skip to content

Commit

Permalink
src/sage/combinat/cartesian_product.py: Update Issue URLs in deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Apr 3, 2024
1 parent dd9af12 commit 6e077cc
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/sage/combinat/cartesian_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class for ``cartesian_product``;
sage: C = CartesianProduct_iters(F1, F2, F3)
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
sage: c = cartesian_product([F1, F2, F3])
sage: type(C.an_element())
Expand Down Expand Up @@ -85,14 +85,14 @@ def __init__(self, *iters):
sage: cp = CartesianProduct_iters([1,2],[3,4]); cp
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
Cartesian product of [1, 2], [3, 4]
sage: loads(dumps(cp)) == cp
True
sage: TestSuite(cp).run(skip='_test_an_element')
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
Check that :issue:`24558` is fixed::
Expand All @@ -102,7 +102,7 @@ def __init__(self, *iters):
sage: CartesianProduct_iters(I, I)
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
Cartesian product of {0, 1, -1, 2, -2, ...}, {0, 1, -1, 2, -2, ...}
"""
from sage.misc.superseded import deprecation
Expand Down Expand Up @@ -134,7 +134,7 @@ def __contains__(self, x):
sage: cp = CartesianProduct_iters([1,2],[3,4])
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
sage: [1,3] in cp
True
sage: [1,2] in cp
Expand Down Expand Up @@ -173,7 +173,7 @@ def __repr__(self):
sage: CartesianProduct_iters(list(range(2)), list(range(3)))
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
Cartesian product of [0, 1], [0, 1, 2]
"""
return "Cartesian product of " + ", ".join(map(str, self.iters))
Expand All @@ -189,7 +189,7 @@ def cardinality(self):
sage: CartesianProduct_iters(range(2), range(3)).cardinality()
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
6
sage: CartesianProduct_iters(range(2), range(3)).cardinality()
6
Expand Down Expand Up @@ -225,7 +225,7 @@ def __len__(self):
sage: C = CartesianProduct_iters(range(3), range(4))
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
sage: len(C)
12
sage: C = CartesianProduct_iters(ZZ, QQ)
Expand All @@ -249,7 +249,7 @@ def list(self):
sage: CartesianProduct_iters(range(3), range(3)).list()
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
[[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2]]
sage: CartesianProduct_iters('dog', 'cat').list()
[['d', 'c'],
Expand Down Expand Up @@ -278,7 +278,7 @@ def __iterate__(self):
sage: [e for e in CartesianProduct_iters(range(3), range(3))]
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
[[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2]]
sage: [e for e in CartesianProduct_iters('dog', 'cat')]
[['d', 'c'],
Expand All @@ -304,7 +304,7 @@ def is_finite(self):
sage: CartesianProduct_iters(ZZ, []).is_finite()
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
True
sage: CartesianProduct_iters(4,4).is_finite()
Traceback (most recent call last):
Expand Down Expand Up @@ -332,7 +332,7 @@ def unrank(self, x):
sage: C = CartesianProduct_iters(range(1000), range(1000), range(1000))
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
sage: C[238792368]
[238, 792, 368]
Expand Down Expand Up @@ -370,7 +370,7 @@ def random_element(self):
sage: c = CartesianProduct_iters('dog', 'cat').random_element()
doctest:warning...
DeprecationWarning: CartesianProduct_iters is deprecated; use cartesian_product instead
See http://trac.sagemath.org/19195 for details.
See https://github.com/sagemath/sage/issues/19195 for details.
sage: c in CartesianProduct_iters('dog', 'cat')
True
"""
Expand Down

0 comments on commit 6e077cc

Please sign in to comment.