cdm/src/main/java/ucar/ma2/MAMath.java
public static Array add(Array a, Array b) throws IllegalArgumentException {

    Array result = Array.factory(a.getDataType(), a.getShape());

    if (a.getElementType() == double.class) {
      addDouble(result, a, b);
    } else
      throw new UnsupportedOperationException();

    return result;
  }
public static Array add(Array a, Array b) throws IllegalArgumentException {

    Array result = Array.factory(a.getDataType(), a.getShape());

    if (a.getElementType() == double.class) {
      addDouble(result, a, b);
    } else
      throw new UnsupportedOperationException();

    return result;
  }
Add elements of two arrays together, allocating the result array.
The result type and the operation type are taken from the type of a.

@param a add values from here
@param b add values from here
@return result = a + b
@throws IllegalArgumentException      a and b are not conformable
@throws UnsupportedOperationException dont support this data type yet