8c271d54da8f609c9b56e9d0ab98d453b3e4f81c,tensorly/metrics/tests/test_entropy.py,,test_vonNeumann_entropy_pure_state,#,18
Before Change
def test_vonNeumann_entropy_pure_state():
tl_vne = np.array(vonNeumann_entropy(mat_pure))
assert np.allclose(tl_vne, np.array([0]), rtol=1e-03, atol=1e-03)
def test_vonNeumann_entropy_pure_state_CP():
mat = parafac(tl.tensor(mat_pure), rank=1, normalize_factors=True)
tl_vne = np.array(vonNeumann_entropy(mat))
After Change
actual_vne = 0.5546
def test_vonNeumann_entropy_pure_state():
state = tl.randn((8, 1))
state = state/tl.norm(state)
mat_pure = tl.dot(state, tl.transpose(state))
tl_vne = vonneumann_entropy(mat_pure)
tl.testing.assert_array_almost_equal(tl_vne, 0, decimal=3)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: tensorly/tensorly
Commit Name: 8c271d54da8f609c9b56e9d0ab98d453b3e4f81c
Time: 2021-03-08
Author: taylorpatti@g.harvard.edu
File Name: tensorly/metrics/tests/test_entropy.py
Class Name:
Method Name: test_vonNeumann_entropy_pure_state
Project Name: tensorly/tensorly
Commit Name: 8c271d54da8f609c9b56e9d0ab98d453b3e4f81c
Time: 2021-03-08
Author: taylorpatti@g.harvard.edu
File Name: tensorly/metrics/tests/test_entropy.py
Class Name:
Method Name: test_vonNeumann_entropy_pure_state_CP
Project Name: tensorly/tensorly
Commit Name: 8c271d54da8f609c9b56e9d0ab98d453b3e4f81c
Time: 2021-03-08
Author: taylorpatti@g.harvard.edu
File Name: tensorly/metrics/tests/test_entropy.py
Class Name:
Method Name: test_vonNeumann_entropy_pure_state
Project Name: geomstats/geomstats
Commit Name: 9f6fa2654c3fbe1764cd53a97189ede9b0ebdb92
Time: 2021-03-31
Author: nicolas.guigui@inria.fr
File Name: tests/test_hypersphere.py
Class Name: TestHypersphere
Method Name: test_sample_von_mises_fisher