MCPcopy Index your code
hub / github.com/dask/dask / ttest_rel

Function ttest_rel

dask/array/stats.py:127–145  ·  view source on GitHub ↗
(a, b, axis=0, nan_policy="propagate")

Source from the content-addressed store, hash-verified

125
126@derived_from(scipy.stats)
127def ttest_rel(a, b, axis=0, nan_policy="propagate"):
128 if nan_policy != "propagate":
129 raise NotImplementedError(
130 "`nan_policy` other than 'propagate' have not been implemented."
131 )
132
133 n = a.shape[axis]
134 df = float(n - 1)
135
136 d = (a - b).astype(np.float64)
137 v = da.var(d, axis, ddof=1)
138 dm = da.mean(d, axis)
139 denom = da.sqrt(v / float(n))
140
141 with np.errstate(divide="ignore", invalid="ignore"):
142 t = da.divide(dm, denom)
143 t, prob = _ttest_finish(df, t)
144
145 return delayed(Ttest_relResult, nout=2)(t, prob)
146
147
148def chisquare(f_obs, f_exp=None, ddof=0, axis=0):

Callers

nothing calls this directly

Calls 5

delayedFunction · 0.90
_ttest_finishFunction · 0.85
astypeMethod · 0.45
varMethod · 0.45
meanMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…