In pull request 589 I added an unflatten function to iterables which
groups elements of an interable into groups of 2 (by default). Is this
a good name? Are there any objections? Should this be in the
namespace?
>>> unflatten([1,2,3,4])
[(1, 2), (3, 4)]
>>> unflatten([1,2,3])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "sympy\utilities\iterables.py", line 72, in unflatten
raise ValueError('iter length is not a multiple of %i' % n)
ValueError: iter length is not a multiple of 2
>>>
--
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.