def projR ( gamma , p ) : return np . multiply ( gamma . T , p / np . maximum ( np . sum ( gamma , axis = 1 ) , 1e-10 ) ) . T
lambert conformal conic projection python
return the KL projection on the row constrints
def projR(gamma, p):
    """return the KL projection on the row constrints """
    return np.multiply(gamma.T, p / np.maximum(np.sum(gamma, axis=1), 1e-10)).T