'Multiply vector vec into every row of the matrix. If a target is
provided, it is used to store the result instead of self.'

def mult_by_row(self, vec, target=None):

    if (not target):
        target = self
    err_code = _eigenmat.mult_by_row_vec(self.p_mat, vec.p_mat, target.p_mat)
    if err_code:
        raise generate_exception(err_code)
    return target
