def mult_diag(d, mtx, left=True):
    if left:
        return (d*mtx.T).T
    else:
        return d*mtx
Multiply a full matrix by a diagonal matrix.
dataset/ETHPy150Open epierson9/ZIFA/ZIFA/ZIFA.py/mult_diag