In numpy, there is a flatten
operation which allows you to, for example, flatten a m x n
matrix down to an array of mn
elements, and a reshape
operations which goes in the opposite direction. Much of the time this can be done with a view, without creating a copy of the original data.
Does such a capability exist in Parallel Colt, the Java matrix library? I have not been able to find one. There is a reshape
method on one-dimensional matrices, but it appears to create copies.