From e8369874088c0ae4b1d98f79f5bae3319de2ac6d Mon Sep 17 00:00:00 2001 From: jeanpouget-abadie Date: Sun, 1 Feb 2015 16:33:04 -0500 Subject: updating code to Python 3 --- src/rip_condition.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rip_condition.py') diff --git a/src/rip_condition.py b/src/rip_condition.py index fccf9a4..634895e 100644 --- a/src/rip_condition.py +++ b/src/rip_condition.py @@ -11,7 +11,7 @@ def find_kth_rip_constants(M, k): 1 - A_2 = arg min |Mx|_2^2 s.t. |x|_2 = 1 and |x|_0 = kx """ delta = 0 - print M.shape + print(M.shape) for col_set in itertools.combinations(xrange(M.shape[1]), k): M_kcol = M[:,list(col_set)] delta_upper, delta_lower = upperlower_bound_rip(M_kcol) @@ -42,7 +42,7 @@ def test(): cascades = cascade_creation.generate_cascades(G, p_init=.3, n_cascades=10) M, __ = cascade_creation.icc_matrixvector_for_node(cascades, None) M = cascade_creation.normalize_matrix(M) - print find_kth_rip_constants(M, 5) + print(find_kth_rip_constants(M, 5)) if __name__=="__main__": -- cgit v1.2.3-70-g09d2