iterators are confusing
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust
調査の方向性
Start with the ArrayBase documentation and the axis_iter(), par_iter(), indexed_iter(), IndexedIter, and Zip entry points named in the issue. Review how into_par_iter() and enumerate() are currently exposed, then seek maintainer guidance on which iterator APIs or documentation changes are wanted. Done means an agreed scope is implemented and the relevant iterator behavior and documentation are covered.
索引モデルが issue の本文から書いたものです。
説明
The current framework for iteration over arrays is confusing. Issue edited because it's even more confusing than at first glance!
Common scenarios for iteration include:
- Iterating over the elements of an array
- Iterating over subviews along an axis of an array
- Iterating mutably
- Indexed iteration
- Iterating over multiple arrays in lockstep
- Parallel iteration with Rayon
Users may expect some consistent idioms with regard to how these different iterators are accessed. The ArrayBase documentation is the starting point for many users. It is currently non-obvious (at least to me) that:
- We can iterate over subviews along an axis in parallel.
Because there isArrayBase::par_iter()but notArrayBase::par_axis_iter(). - We can have indexed iterators over subview along an axis.
Because there isArrayBase::indexed_iter()but notArrayBase::indexed_axis_iter().
I may be missing it, but it appears there is no currently no way to:
- Get a parallel version of
IndexedIterwithout the overhead ofZip::indexed(). - Get a (non-parallel)
IteratorfromZip.
There are good reasons for some of these idiosyncrasies (e.g. expeditious blanket impls), but they still steepen ndarray's learning curve. Ways to address this would include:
- Adding hints about
into_par_iter()andenumerate()to the documentation forArrayBase::axis_iter().
Or adding corresponding convenience methodsArrayBase::indexed_axis_iter(). - Implementing
IntoParallelIteratorforIndexedIter.
Assuming it can be more efficient thanZip::indexed(). - Implementing
IntoIteratorforZip.
What are the maintainers' views on these ideas? I would be happy to contribute pull requests with some guidance.
- 主要言語
- Rust
- スター
- 4.3k
- フォーク
- 391
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rust-ndarray/ndarray のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rust-ndarray/ndarray#1612 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
rust-ndarray/ndarray#1617 · コメント 1 件 ·
-
bug good first issue
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
rust-ndarray/ndarray#1615 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
rust-ndarray/ndarray#1610 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
rust-ndarray/ndarray#1609 ·
rust-ndarray/ndarray の issue をすべて見る
似ている issue
-
risk:low runtime status:in-progress type:test
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
EricSpencer00/Resilient#4835 · コメント 1 件 ·
-
agent:ready documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cesarferreira/stax#890 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100