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