#13982: rewrite sage.combinat.combinat.unordered_tuples using
itertools.combinations_with_replacement
-------------------------------------+-------------------------------------
Reporter: nbruin | Owner: sage-combinat
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-6.4
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: Travis Scrimshaw | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/combinat/rewrite_unordered_tuples-13982|
373e5858694adf822102b2a1b9e40ce53cd776a6
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by tscrim):
* status: needs_info => needs_review
Comment:
Because using the `itertools` directly for a multiset gives multiple
copies of the same tuple
{{{
sage: list(itertools.combinations_with_replacement([1,1], 2))
[(1, 1), (1, 1), (1, 1)]
}}}
which is a different behavior (this should just return a single tuple of
`[(1, 1)]`).
--
Ticket URL: <http://trac.sagemath.org/ticket/13982#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.