Skip to content

Commit

Permalink
Fix EntropicPotentials's test (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalk8 authored Mar 22, 2023
1 parent 5bbf4a1 commit 9bc5477
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/problems/linear/potentials_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@ def test_entropic_potentials_pnorm(
)

if p == 1.0:
with pytest.raises(AssertionError, match="Legendre transform not"):
z = potentials.transport(x_test, forward=forward)
# h_legendre not defined in this case, NaNs will be returned, see also
# https://github.com/ott-jax/ott/pull/340
z = potentials.transport(x_test, forward=forward)
np.testing.assert_array_equal(z, np.nan)
else:
if forward:
z = potentials.transport(x_test, forward=forward)
Expand Down

0 comments on commit 9bc5477

Please sign in to comment.