'Add a multiple of the sums of the matrix mat along the given dimension
to self.'

def add_sums(self, mat, axis, mult=1.0):

    m = _eigenmat.get_leading_dimension(mat.p_mat)
    n = _eigenmat.get_nonleading_dimension(mat.p_mat)
    err_code = _eigenmat.add_sum_by_axis(mat.p_mat, self.p_mat, ct.c_int(axis), ct.c_float(mult))
    if err_code:
        raise generate_exception(err_code)
    return self
