Skip to content

Commit

Permalink
Addressing reviewer comments.
Browse files Browse the repository at this point in the history
Removed special case handling from _kolmogn_DMTW as handled in _kolmogn.
Simplified _kolmogn_PelzGood as subtractive cancellation not an issue for the
 extra terms in K2, K3.
Added _log_nfactorial_div_n_pow_n(n) to compute log(n!/n**n).
Removed unneeded comments and/or code notived by reviewer.
Removed _kolmogn_LCK as not used.
Made some function docstrings compliant.
  • Loading branch information
pvanmulbregt authored and gwgundersen committed Jul 18, 2020
1 parent 80edda0 commit e7b8bfe
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 225 deletions.
6 changes: 3 additions & 3 deletions scipy/stats/_distn_infrastructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1662,14 +1662,14 @@ def _ppf_single(self, q, *args):
left = min(-factor, right)
while self._ppf_to_solve(left, q, *args) > 0.:
left, right = left * factor, left
# left is now such that cdf(left) < q
# if right has changed, then cdf(rught) >= q
# left is now such that cdf(left) <= q
# if right has changed, then cdf(right) > q

if np.isinf(right):
right = max(factor, left)
while self._ppf_to_solve(right, q, *args) < 0.:
left, right = right, right * factor
# right is now such that cdf(right) > q
# right is now such that cdf(right) >= q

return optimize.brentq(self._ppf_to_solve,
left, right, args=(q,)+args, xtol=self.xtol)
Expand Down
Loading

0 comments on commit e7b8bfe

Please sign in to comment.