final static char commonType(final char a, final char b) {
        if (a == b) { return a; }
        final short atype = PyMultiarray.typeToKind(a), btype = PyMultiarray
                .typeToKind(b);
        final short newtype = (atype > btype) ? atype : btype;
        if (newtype == PyMultiarray.PYOBJECT) { return 'O'; }
        final short asize = PyMultiarray.typeToNBytes(a), bsize = PyMultiarray
                .typeToNBytes(b);
        final short newsize = (asize > bsize) ? asize : bsize;
        return PyMultiarray.kindAndNBytesToType(newtype, newsize);
    }