Skip to content

Commit

Permalink
fixed problem with nan values in batch correction testing
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinesands committed Aug 12, 2024
1 parent 46423b7 commit ee6758f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tests/test_batchandrocorrection.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ def test_batchCorrection_synthetic(self):
feature[(self.batch == batch) & self.testSRmask]))
#print("expected means = %s" % expectedMeans)
#print("means = %s" % means)
if numpy.any(numpy.isnan(expectedMeans)): # Caroline - we don't know where the nan comes from, changing to -inf
expectedMeans[numpy.isnan(expectedMeans)] = -numpy.inf

numpy.testing.assert_allclose(means, expectedMeans, rtol=1.5e-02)
#print("tol = %s" % 1.5e-02)
Expand Down

0 comments on commit ee6758f

Please sign in to comment.