def divide_gaussians(mean_precision_num, mean_precision_den):
    precision_op = mean_precision_num[1] - mean_precision_den[1]
    try:
        assert precision_op >= 0.        #   making it > so that mean_op is not inf
    except AssertionError:
        print 'inputs = %s, %s' % (mean_precision_num, mean_precision_den)
        print 'precision_op = %s' % (precision_op)
        raise AssertionError
    if precision_op == 0.:
        mean_op = 0.
    else:
        mean_op = (mean_precision_num[0] * mean_precision_num[1] \
                     - mean_precision_den[0] * mean_precision_den[1] ) / precision_op
    return np.array([mean_op, precision_op])
mean_precision_num are parameters of gaussian in the numerator
dataset/ETHPy150Open balajiln/mondrianforest/src/utils.py/divide_gaussians