code: public static int getDimension(INDArray arr, boolean defaultRows) {
          // FIXME: int cast
  
          //ignore ordering for vectors
          if (arr.isVector()) {
              return defaultRows ? (int) arr.rows() : (int) arr.columns();
          }
          if (arr.ordering() == NDArrayFactory.C)
              return defaultRows ? (int) arr.columns() : (int) arr.rows();
          return defaultRows ? (int) arr.rows() : (int) arr.columns();
      }
docs: Get the dimension associated with
  the given ordering.
  
  When working with blas routines, they typically assume
  c ordering, instead you can invert the rows/columns
  which enable you to do no copy blas operations.
  
  
  
  @param arr
  @param defaultRows
  @return