def partition(self, dimension):
<EOL>for i, channel in enumerate(self.u):<EOL><INDENT>if self.v[i].shape[<NUM_LIT:1>] < dimension:<EOL><INDENT>raise IndexError('<STR_LIT>'<EOL>% self.v[i].shape[<NUM_LIT:1>])<EOL><DEDENT>self.data[i] = channel[:, <NUM_LIT:0>:dimension]<EOL><DEDENT>self.dimension = dimension<EOL>return self<EOL>
Partition subspace into desired dimension.

:type dimension: int
:param dimension: Maximum dimension to use.