Skip to content

Commit 1a3a0c3

Browse files
author
Joao Felipe Rocha
committed
Modifying landmark in Knn. Modified expected error message on inverse transform sparse
1 parent 91a9b57 commit 1a3a0c3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/test_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,12 @@ def test_inverse_transform_sparse_svd():
387387
G.inverse_transform(G.data_nu, columns=data.shape[1])
388388
with assert_raises_message(
389389
TypeError,
390-
"A sparse matrix was passed, but dense data is required. Use X.toarray() to convert to a dense numpy array.",
390+
"Sparse data was passed, but dense data is required. Use '.toarray()' to convert to a dense numpy array.",
391391
):
392392
G.inverse_transform(sp.csr_matrix(G.data)[:, 0])
393393
with assert_raises_message(
394394
TypeError,
395-
"A sparse matrix was passed, but dense data is required. Use X.toarray() to convert to a dense numpy array.",
395+
"Sparse data was passed, but dense data is required. Use '.toarray()' to convert to a dense numpy array.",
396396
):
397397
G.inverse_transform(sp.csr_matrix(G.data)[:, :15])
398398
with assert_raises_message(

test/test_landmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def test_landmark_exact_pygsp_graph():
127127

128128

129129
def test_landmark_knn_pygsp_graph():
130-
n_landmark = 500
130+
n_landmark = 150
131131
# knn graph
132132
G = build_graph(
133133
data,

0 commit comments

Comments
 (0)