code: public static boolean shapeEquals(int[] shape1, int[] shape2) {
          if (isColumnVectorShape(shape1) && isColumnVectorShape(shape2)) {
              return Arrays.equals(shape1, shape2);
          }
  
          if (isRowVectorShape(shape1) && isRowVectorShape(shape2)) {
              int[] shape1Comp = squeeze(shape1);
              int[] shape2Comp = squeeze(shape2);
              return Arrays.equals(shape1Comp, shape2Comp);
          }
  
          //scalars
          if(shape1.length == 0 || shape2.length == 0) {
              if(shape1.length == 0 && shapeIsScalar(shape2)) {
                  return true;
              }
  
              if(shape2.length == 0 && shapeIsScalar(shape1)) {
                  return true;
              }
          }
  
  
          shape1 = squeeze(shape1);
          shape2 = squeeze(shape2);
  
          return scalarEquals(shape1, shape2) || Arrays.equals(shape1, shape2);
      }
docs: Returns whether 2 shapes are equals by checking for dimension semantics
  as well as array equality
  
  @param shape1 the first shape for comparison
  @param shape2 the second shape for comparison
  @return whether the shapes are equivalent