Python assert xor. addWeighted (), etc. Note that the accepted answer is wrong: != is not ...