mpylab.tools.sequences moduleΒΆ
Sequence and index helper functions.
- mpylab.tools.sequences.cmp(a, b)
cmp function.
- mpylab.tools.sequences.combinations(items)
Return cartesian combinations for a nested list-of-lists input.
- mpylab.tools.sequences.flatten(items)
Flatten nested sequences into one flat list.
- mpylab.tools.sequences.getIndex(val, tab)
Return the index so that
valis betweentab[index - 1]andtab[index].tabis expected to be sorted. The historical camel-case name is kept because this helper is used by existing measurement scripts.
- mpylab.tools.sequences.isiterable(obj)
Return whether object supports iteration.
- mpylab.tools.sequences.issequence(obj)
Return whether
objis iterable but not a string.
- mpylab.tools.sequences.map2singlechar(i)
Map integer index to compact alphanumeric symbol.