Add examples of more complex NpyIter usage to the documentation.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 32.8k
- Forks
- 12.8k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 197
Description
The iterator is nice in some regards, simple things are simple, and simply iterating over all elements is straightforward. However, how to do things like what PyArray_IterAllButAxis does but with multiple broadcasted arrays, etc is pretty opaque. (To me at least; maybe I'm just dense.)
My currently go at using nested iterators to try things out is here, FWIW. I'm performing a reduction along a specified tuple of axes, computing both the sum and product stored in the same output array. Its a bit of mess, but it does seem to work. Doing this kind of thing appears to take quite a lot of setup though.
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 reading the NpyIter and PyArray_IterAllButAxis API material and studying the linked gist's nested-iterator reduction example. Done means the documentation includes clear examples for multiple broadcasted arrays and similarly complex NpyIter usage, including the reduction scenario described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100