Added clone to matrix select() operation. Modified ANN components to make a copy of the input matrix if it is not contiguous.