code: public static boolean isVector(int[] shape) {
          if (shape.length > 2 || shape.length < 1)
              return false;
          else {
              long len = ArrayUtil.prodLong(shape);
              return shape[0] == len || shape[1] == len;
          }
      }
docs: Returns whether the given shape is a vector
  
  @param shape the shape to test
  @return whether the given shape is a vector