Skip to content

Commit

Permalink
fix hiding of parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-sicho committed Jun 26, 2024
1 parent 047ce53 commit 2220998
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions qsprpred/utils/testing/check_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,14 @@ def check_shape(predictions, model, num_smiles, use_probas):
)

# define check for comparing predictions with expected result
def check_predictions(predictions, expected_result, expect_equal_result):
def check_predictions(preds, expected, expect_equal):
# check if predictions are almost equal to expected result (rtol=1e-5)
check_outcome = self.assertTrue if expect_equal_result else self.assertFalse
if isinstance(expected_result, list):
for i in range(len(expected_result)):
check_outcome(np.allclose(predictions[i], expected_result[i]))
check_outcome = self.assertTrue if expect_equal else self.assertFalse
if isinstance(expected, list):
for i in range(len(expected)):
check_outcome(np.allclose(preds[i], expected[i]))
else:
check_outcome(np.allclose(predictions, expected_result))
check_outcome(np.allclose(preds, expected))

# Check if the predictMols function gives the same result as the
# predict/predictProba function
Expand Down

0 comments on commit 2220998

Please sign in to comment.