def norm_infty(x): """Compute infinity norm of `x`.""" if len(x) > 0: return norm(x, ord=infty) return 0.0