Line 0
Link Here
|
|
|
1 |
--- scikits/sparse/test_cholmod.py.orig 2015-06-24 10:39:06 UTC |
2 |
+++ scikits/sparse/test_cholmod.py |
3 |
@@ -53,17 +53,17 @@ def test_integer_size(): |
4 |
def test_cholesky_smoke_test(): |
5 |
f = cholesky(sparse.eye(10, 10) * 1.) |
6 |
d = np.arange(20).reshape(10, 2) |
7 |
- print "dense" |
8 |
+ print("dense") |
9 |
assert np.allclose(f(d), d) |
10 |
- print "sparse" |
11 |
+ print("sparse") |
12 |
s_csc = sparse.csc_matrix(np.eye(10)[:, :2] * 1.) |
13 |
assert sparse.issparse(f(s_csc)) |
14 |
assert np.allclose(f(s_csc).todense(), s_csc.todense()) |
15 |
- print "csr" |
16 |
+ print("csr") |
17 |
s_csr = s_csc.tocsr() |
18 |
assert sparse.issparse(f(s_csr)) |
19 |
assert np.allclose(f(s_csr).todense(), s_csr.todense()) |
20 |
- print "extract" |
21 |
+ print("extract") |
22 |
assert np.all(f.P() == np.arange(10)) |
23 |
|
24 |
def real_matrix(): |
25 |
@@ -193,7 +193,7 @@ def test_cholesky_matrix_market(): |
26 |
f3.cholesky_AAt_inplace(X.T) |
27 |
assert np.allclose(f3(Xty), answer) |
28 |
|
29 |
- print problem, mode |
30 |
+ print(problem, mode) |
31 |
for f in (f1, f2, f3, f4): |
32 |
pXtX = XtX.todense()[f.P()[:, np.newaxis], |
33 |
f.P()[np.newaxis, :]] |