def blocking(indices, block_size, initial_boundary=<NUM_LIT:0>):
blocks = []<EOL>for idx in indices:<EOL><INDENT>bl_idx = (idx-initial_boundary)//float(block_size)<EOL>if bl_idx not in blocks:<EOL><INDENT>blocks.append(bl_idx)<EOL><DEDENT><DEDENT>blocks.sort()<EOL>return blocks<EOL>
Split list of integers into blocks of block_size and return block indices.

First block element will be located at initial_boundary (default 0).

>>> blocking([0, -1, -2, -3, -4, -5, -6, -7, -8, -9], 8)
[0,-1]
>>> blocking([0], 8)
[0]
>>> blocking([0], 8, initial_boundary=32)
[-4]