Skip to content

Commit c71c73f

Browse files
committed
update function in reportables to indicate API limitation. Bugfix in frobenius norm computation. Bugfix in test_optools.py.
1 parent 0ff2644 commit c71c73f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/unit/tools/test_optools.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,13 @@ def setUp(self):
379379
[-0.35432747-0.27939404j, -0.02266757+0.71502652j, -0.27452307+0.07511567j, 0.35432747+0.27939404j],
380380
[ 0.71538573+0.j, 0.2680266 +0.36300238j, 0.2680266 -0.36300238j, 0.28461427+0.j]])
381381

382+
def test_frobenius_distance(self):
383+
self.assertAlmostEqual(ot.frobeniusdist(self.A, self.A), 0.0)
384+
self.assertAlmostEqual(ot.frobeniusdist(self.A, self.B), 0.6204836823)
385+
386+
self.assertAlmostEqual(ot.frobeniusdist_squared(self.A, self.A), 0.0)
387+
self.assertAlmostEqual(ot.frobeniusdist_squared(self.A, self.B), 0.385)
388+
382389
def test_jtrace_distance(self):
383390
val = ot.jtracedist(self.A_TP, self.A_TP, mx_basis="pp")
384391
self.assertAlmostEqual(val, 0.0)

0 commit comments

Comments
 (0)