I think if you use rotations instead of permutations it will give you
what you want:
```
def rotations(seq):
for i in range(len(seq)):
yield seq
seq.append(seq.pop(0))
def kbins:
if unordered:
if unique:
func = rotations
else:
func = permutations
...
if ordered:
yield
else:
...
for p in func(...) <-- instead of permutations(...)
...
```
Chris
--
You received this message because you are subscribed to the Google Groups
"sympy" 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/sympy?hl=en.