a | b/tests/limma/test_fitFDist.py | ||
---|---|---|---|
1 | import unittest |
||
2 | |||
3 | import numpy as np |
||
4 | |||
5 | from inmoose.limma.fitFDist import trigammaInverse |
||
6 | |||
7 | |||
8 | class Test(unittest.TestCase): |
||
9 | def test_trigammainverse(self): |
||
10 | res = trigammaInverse(np.array([np.nan, 0, 1e8, -1, 5])) |
||
11 | self.assertTrue( |
||
12 | np.allclose( |
||
13 | res, |
||
14 | [np.nan, np.inf, 0.0001000, np.nan, 0.4961687], |
||
15 | equal_nan=True, |
||
16 | atol=1e-5, |
||
17 | ) |
||
18 | ) |