code: @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)));
  
      }
docs: Rotate a matrix 90 degrees
  
  @param toRotate the matrix to rotate
  @return the rotated matrix