private final static PyMultiarray getResultArray(final PyMultiarray a, final PyMultiarray b, char type) {
        if (type == '\0') {
            type = a._typecode;
        }
        final int[] dimensions = new int[a.dimensions.length];
        for (int i = 0; i < a.dimensions.length; i++) {
            dimensions[i] = Math.max(a.dimensions[i], b.dimensions[i]);
        }
        return PyMultiarray.zeros(dimensions, type);
    }