This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2017年05月24日 21:47 by leodema, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| unnamed.png | leodema, 2017年05月24日 21:47 | Graph of expovariate(1) and gammavariate(alpha=1, beta=beta) | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 1798 | merged | leodema, 2017年05月25日 08:29 | |
| PR 1934 | leodema, 2017年06月03日 20:46 | ||
| Messages (5) | |||
|---|---|---|---|
| msg294403 - (view) | Author: Leonardo De Marchi (leodema) * | Date: 2017年05月24日 21:47 | |
The gammavariate function in random.py has a wrong comment. It says that when alpha is one it's equivalent to call expovariate(1). We can see that is not true (see graphs) and it should be expovariate(1/beta). It's not a big deal but it can cause confusion. |
|||
| msg294438 - (view) | Author: Raymond Hettinger (rhettinger) * (Python committer) | Date: 2017年05月25日 06:24 | |
I agree that the comment should be changed. While we at it, perhaps sync-up with expovariate() code and eliminate the ``u <= 1e-7`` test: Instead of: elif alpha == 1.0: # expovariate(1) u = random() while u <= 1e-7: u = random() return -_log(u) * beta Use this instead: elif alpha == 1.0: # expovariate(1.0 / beta) return -_log(1.0 - random()) * beta |
|||
| msg342247 - (view) | Author: Mark Dickinson (mark.dickinson) * (Python committer) | Date: 2019年05月12日 09:10 | |
This was fixed in PRs GH-1798 and GH-1934. Closing. |
|||
| msg342249 - (view) | Author: SilentGhost (SilentGhost) * (Python triager) | Date: 2019年05月12日 09:14 | |
Does "a difference stream" in PR 1934 (news entry): > It does however produce a difference stream of random variables than it used to. make some sense? Sentence doesn't seem grammatical. |
|||
| msg342251 - (view) | Author: Mark Dickinson (mark.dickinson) * (Python committer) | Date: 2019年05月12日 10:22 | |
That should clearly have been "different stream" rather than "difference stream". |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:46 | admin | set | github: 74649 |
| 2019年05月12日 10:22:36 | mark.dickinson | set | messages: + msg342251 |
| 2019年05月12日 09:14:59 | SilentGhost | set | resolution: fixed messages: + msg342249 nosy: + SilentGhost |
| 2019年05月12日 09:10:06 | mark.dickinson | set | status: open -> closed messages: + msg342247 stage: resolved |
| 2017年06月03日 20:46:44 | leodema | set | pull_requests: + pull_request2012 |
| 2017年05月25日 08:29:29 | leodema | set | pull_requests: + pull_request1896 |
| 2017年05月25日 06:24:44 | rhettinger | set | assignee: mark.dickinson messages: + msg294438 |
| 2017年05月25日 00:36:10 | rhettinger | set | nosy:
+ rhettinger, mark.dickinson |
| 2017年05月24日 21:47:13 | leodema | create | |