def logDiffExp(A, B, out=None):
if out is None:<EOL><INDENT>out = numpy.zeros(A.shape)<EOL><DEDENT>indicator1 = A >= B<EOL>assert indicator1.all(), "<STR_LIT>"<EOL>out[indicator1] = A[indicator1] + numpy.log(<NUM_LIT:1> - numpy.exp(B[indicator1]-A[indicator1]))<EOL>return out<EOL>
returns log(exp(A) - exp(B)). A and B are numpy arrays. values in A should be
    greater than or equal to corresponding values in B