Usage of splitListIntoContiguousLists
Return to directory of Todd's CASA extensions
Converts a list of integers into a list of contiguous lists, and optionally trim and recombine.
Called by
copyweights. See also
splitListIntoHomogeneousLists.
Usage:
au.splitListIntoContiguousLists(mylist, trim=0, recombine=False)
Inputs:
- mylist: a python list
- trim: the number of entries to trim from each edge of each contiguous list
- recombine: if True, the recombine the contiguous lists (only relevant after trimming)
Example:
CASA <29>: au.splitListIntoContiguousLists([1,2,3,5,6,7])
Out[29]: [[1, 2, 3], [5, 6, 7]]
-- Main.ToddHunter - 2013-09-08