def addouter(C, b, factor=1):
    """Add in place `factor` times outer product of vector `b`,

    without any dimensional consistency checks.
    """
    for i in range(C.shape[0]):
        for j in range(C.shape[1]):
            C[i,j] += factor * b[i] * b[j]
    return C