LAt = np.dot(L, A.T)
else:
LAt = np.linalg.solve(np.dot(A.T, A) + rho * np.eye(m), A.T)
LAtB = np.dot(LAt, B)
LAtApI = np.dot(LAt, A) - np.eye(m)
After Change
// This puts our initial iterate X into the column space of A
// so that we have strong (local) convexity
X = np.linalg.lstsq(A, B)[0]
Y = np.zeros(X.shape, dtype=A.dtype)
np.maximum(X, 0.0, Y)
W = X - Y
residual = W.copy()