IIUC this type check is assuming that if `m1.dtype == m2.dtype` then `m1.dtype == result.dtype` as well. But I don't think this is true in all cases -- true_divide violates it all over the place, but also there's 'mm->d' for np.divide, and in the future arithmetic on bools will probably cast to int.