ind = range(t)
while True:
Y = np.asarray(A_linear_operator.matmat(X))
g = [norm_1d_1(Y[:, j]) for j in range(t)]
best_j = np.argmax(g)
g = sorted(g, reverse=True)
S = sign_round_up(Y)
Z = np.asarray(AT_linear_operator.matmat(S))
After Change
g = sorted(g, reverse=True)
S = sign_round_up(Y)
Z = np.asarray(AT_linear_operator.matmat(S))
h = np.max(np.abs(Z), axis=1)
// If this algorithm runs for fewer than two iterations,
// then its return values do not have the properties indicated
// in the description of the algorithm.