Skip to content

Commit

Permalink
test inverse transform columns on no pca
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgigante committed Jul 11, 2018
1 parent 2d0f9fa commit b27bda9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ def test_inverse_transform_sparse_svd():

def test_inverse_transform_dense_no_pca():
G = build_graph(data, n_pca=None)
np.testing.assert_allclose(data[:, 5:7],
G.inverse_transform(G.data_nu, columns=[5, 6]),
atol=1e-12)
assert(np.all(G.data == G.inverse_transform(G.data_nu)))
assert_raises(ValueError, G.inverse_transform, G.data[:, 0])
assert_raises(ValueError, G.inverse_transform, G.data[:, None, :15])
Expand Down

0 comments on commit b27bda9

Please sign in to comment.