code: public static void checkForEqualDimensions(ArrayND a0, ArrayND a1)
      {
          if (a0.getSize().getSize() != a1.getSize().getSize())
          {
              throw new IllegalArgumentException(
                  "Arrays have different dimensions: "+a0.getSize().getSize()+
                  " and "+a1.getSize().getSize());
          }
      }
docs: Checks whether given given {@link ArrayND}s have equal dimensions,
  and throws an <code>IllegalArgumentException</code> if not.
  
  @param a0 The first array
  @param a1 The second array
  @throws NullPointerException If any argument is <code>null</code>
  @throws IllegalArgumentException If the given arrays
  do not have equal dimensions