GitHub PullRequestReviewCommentEvent at 2014-01-24 14:10:50
Repository: scipy
Actor: ev-br
Payload: {"comment":{"url":"https://api.github.com/repos/scipy/scipy/pulls/comments/9148737","id":9148737,"diff_hunk":"@@ -1418,42 +1418,60 @@ class genpareto_gen(rv_continuous):\n \n         genpareto.pdf(x, c) = (1 + c * x)**(-1 - 1/c)\n \n-    for ``c != 0``, and for ``x >= 0`` for all c,\n-    and ``x < 1/abs(c)`` for ``c < 0``.\n+    for ``c >= 0`` ``x >= 0``, and \n+    for ``c < 0`` ``0 <= x <= -1/c``\n+\n+    For ``c == 0``, `genpareto` reduces to the exponential \n+    distribution, `expon`::\n+\n+        genpareto.pdf(x, c=0) = exp(-x)\n \n     %(example)s\n \n     \"\"\"\n     def _argcheck(self, c):\n         c = asarray(c)\n-        self.b = where(c < 0, 1.0/abs(c), inf)\n-        return where(c == 0, 0, 1)\n+        self.b = _lazywhere(c < 0, (c,),\n+                lambda c: -1. / c, np.inf)\n+        return True\n \n     def _pdf(self, x, c):\n-        Px = pow(1+c*x, asarray(-1.0-1.0/c))\n-        return Px\n+        return np.exp(self._logpdf(x, c))\n \n     def _logpdf(self, x, c):\n-        return (-1.0-1.0/c) * np.log1p(c*x)\n+        return -(c + 1.) * self._log1pcx(x, c)","path":"scipy/stats/_continuous_distns.py","position":95,"original_position":41,"commit_id":"9fc4d7b230b564abc2e546c67630f7f2c647f706","original_commit_id":"9c3c02f7e520c52624215142ea8e65afea39ff0b","user":{"login":"ev-br","id":2133832,"avatar_url":"https://gravatar.com/avatar/bd4477dc26bf9941268fbfa05abdeae6?d=https%3A%2F%2Fidenticons.github.com%2F44b47eec80361060fbee7362fc7b74ca.png&r=x","gravatar_id":"bd4477dc26bf9941268fbfa05abdeae6","url":"https://api.github.com/users/ev-br","html_url":"https://github.com/ev-br","followers_url":"https://api.github.com/users/ev-br/followers","following_url":"https://api.github.com/users/ev-br/following{/other_user}","gists_url":"https://api.github.com/users/ev-br/gists{/gist_id}","starred_url":"https://api.github.com/users/ev-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev-br/subscriptions","organizations_url":"https://api.github.com/users/ev-br/orgs","repos_url":"https://api.github.com/users/ev-br/repos","events_url":"https://api.github.com/users/ev-br/events{/privacy}","received_events_url":"https://api.github.com/users/ev-br/received_events","type":"User","site_admin":false},"body":"Great! Would you be able to run the full stats test suite on your machine, using the updated PR?","created_at":"2014-01-24T14:10:50Z","updated_at":"2014-01-24T14:10:50Z","html_url":"https://github.com/scipy/scipy/pull/3225#discussion_r9148737","pull_request_url":"https://api.github.com/repos/scipy/scipy/pulls/3225","_links":{"self":{"href":"https://api.github.com/repos/scipy/scipy/pulls/comments/9148737"},"html":{"href":"https://github.com/scipy/scipy/pull/3225#discussion_r9148737"},"pull_request":{"href":"https://api.github.com/repos/scipy/scipy/pulls/3225"}}}}