code: public static boolean isMatrix(DataBuffer shapeInfo) {
          int rank = Shape.rank(shapeInfo);
          if (rank != 2)
              return false;
          return !isVector(shapeInfo);
      }
docs: Returns whether the passed in shape is a matrix
  
  @param shapeInfo whether the passed in shape is a matrix
  @return true if the shape is a matrix false otherwise