@ Override public void rot90 ( INDArray toRotate ) { if ( ! toRotate . isMatrix ( ) ) throw new IllegalArgumentException ( "Only rotating matrices" ) ; INDArray start = toRotate . transpose ( ) ; for ( int i = 0 ; i < start . rows ( ) ; i ++ ) start . putRow ( i , reverse ( start . getRow ( i ) ) ) ; }
Rotate a matrix 90 degrees