Common code between all 3 t-test functions.
(df, t)
| 454 | |
| 455 | |
| 456 | def _ttest_finish(df, t): |
| 457 | """Common code between all 3 t-test functions.""" |
| 458 | # XXX: np.abs -> da.absolute |
| 459 | # XXX: delayed(distributions.t.sf) |
| 460 | prob = ( |
| 461 | delayed(distributions.t.sf)(da.absolute(t), df) * 2 |
| 462 | ) # use np.abs to get upper tail |
| 463 | if t.ndim == 0: |
| 464 | t = t[()] |
| 465 | |
| 466 | return t, prob |
| 467 | |
| 468 | |
| 469 | def _count(x, axis=None): |
no test coverage detected