ENH: Add `out` parameter to all Generator distributions
Open
Nobody has claimed this yet.
01 - Enhancement
component: numpy.random
- Dominant language
- Python
- Stars
- 32.8k
- Forks
- 12.8k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 197
Description
Random distribution functions like numpy.random.binomial allocate a new out array if the input parameters are arrays. This may lead to high memory consumption. Please add the out parameter to such functions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Generator distribution implementations, using numpy.random.binomial as the concrete example named in the issue. Identify the full set of distributions covered by “all Generator distributions” and check how array inputs currently allocate results. Done means the applicable functions accept an out parameter and avoid allocating a new output array when it is provided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100