Skip to content

Commit

Permalink
updating test to be explicit about return values
Browse files Browse the repository at this point in the history
  • Loading branch information
CDonnerer committed Jan 15, 2023
1 parent 9ace51c commit c72cfa8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 32 deletions.
9 changes: 1 addition & 8 deletions tests/distributions/test_exponential.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,4 @@ def test_loss(exponential):
params=np.array([np.log(1), ]),
)
assert loss_name == "Exponential-NLL"
np.testing.assert_array_equal(
loss_values,
np.array(
[
1.0,
]
),
)
np.testing.assert_array_equal(loss_values, np.array([1.0]))
9 changes: 1 addition & 8 deletions tests/distributions/test_laplace.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,4 @@ def test_loss(laplace):
params=np.array([[1, np.log(1)], ]),
)
assert loss_name == "Laplace-NLL"
np.testing.assert_approx_equal(
loss_values,
np.array(
[
-np.log(0.5),
]
),
)
np.testing.assert_approx_equal(loss_values, np.array([-np.log(0.5)]))
9 changes: 1 addition & 8 deletions tests/distributions/test_log_normal.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,4 @@ def test_loss(lognormal):
params=np.array([[1, 0], ]),
)
assert loss_name == "LogNormal-NLL"
np.testing.assert_array_equal(
loss_values,
np.array(
[
np.inf,
]
),
)
np.testing.assert_array_equal(loss_values, np.array([np.inf]))
9 changes: 1 addition & 8 deletions tests/distributions/test_poisson.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,4 @@ def test_loss(poisson):
params=np.array([np.log(1), ]),
)
assert loss_name == "Poisson-NLL"
np.testing.assert_array_equal(
loss_values,
np.array(
[
1.0,
]
),
)
np.testing.assert_array_equal(loss_values, np.array([1.0]))

0 comments on commit c72cfa8

Please sign in to comment.