LAL  7.5.0.1-bede9b2
iterutils.py File Reference

Prototypes

def lal.iterutils.MultiIter (*sequences)
 A generator for iterating over the elements of multiple sequences simultaneously. More...
 
def lal.iterutils.choices (vals, n)
 A generator for iterating over all choices of n elements from the input sequence vals. More...
 
def lal.iterutils.uniq (iterable)
 Yield the unique items of an iterable, preserving order. More...
 
def lal.iterutils.nonuniq (iterable)
 Yield the non-unique items of an iterable, preserving order. More...
 
def lal.iterutils.flatten (sequence, levels=1)
 Example:

nested = [[1,2], [[3]]] list(flatten(nested))

[1, 2, [3]]. More...

 
def lal.iterutils.inplace_filter (func, sequence)
 Like Python's filter() builtin, but modifies the sequence in place. More...
 
def lal.iterutils.inorder (*iterables, **kwargs)
 A generator that yields the values from several ordered iterables in order. More...
 
def lal.iterutils.randindex (lo, hi, n=1.)
 Yields integers in the range [lo, hi) where 0 <= lo < hi. More...
 

Go to the source code of this file.

Namespaces

 lal.iterutils