#6538: bug in Partitions
---------------------------+------------------------------------------------
Reporter: jhpalmieri | Owner: mhansen
Type: defect | Status: new
Priority: major | Milestone: sage-combinat
Component: combinatorics | Keywords: partitions
Reviewer: | Author:
Merged: |
---------------------------+------------------------------------------------
Looks like there is a bug in Partitions. Partitions(n, max_slope=-1)
should give the partitions of n with distinct parts, right?
{{{
sage: Partitions(2, max_slope=-1).list()
[[2]]
sage: Partitions(4, max_slope=-1).list()
[[4], [3, 1]]
}}}
But if you add the "length" keyword, it doesn't work anymore, at least not
completely:
{{{
sage: Partitions(2, max_slope=-1, length=2).list() # doesn't work
[[1, 1]]
sage: Partitions(4, max_slope=-1, length=2).list() # works
[[3, 1]]
sage: Partitions(4, max_slope=-1, length=3).list() # doesn't work
[[2, 1, 1]]
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6538>
Sage <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---