def _get_norms(self, a, b): _nb = _norm_cdf(b) _na = _norm_cdf(a) _sb = _norm_sf(b) _sa = _norm_sf(a) _delta = np.where(a > 0, _sa - _sb, _nb - _na) return _na, _nb, _sa, _sb, _delta, np.log(_delta)
def _argcheck(self, a, b): self.a = a self.b = b self._nb = _norm_cdf(b) self._na = _norm_cdf(a) self._sb = _norm_sf(b) self._sa = _norm_sf(a) self._delta = self._nb - self._na idx = self.a > 0 self._delta[idx] = -(self._sb[idx] - self._sa[idx]) self._logdelta = np.log(self._delta) return (a != b)