Perform each operation only in the correct formats
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
リンクされているSciPy issueのコメントとscipy-devスレッドから始め、ここで説明されているDOK、COO、CSD間の変換に対する提案された動作を比較してください。完了基準は指定されていません。このissueでは、どの操作が各形式を受け付けるか、または返すかについて、合意された設計が必要です。書き込みに明示的なDOK変換が必要かどうかも含まれます。
索引モデルが issue の本文から書いたものです。
説明
Based on https://github.com/scipy/scipy/issues/8162#issuecomment-344469036 I'm opening this issue in order to debate the merits and demerits of writing multiple implementations for every operation.
I'm specifically referring to the third bullet point in that comment, quoted below:
It'll remain important to give users a choice of the sparse storage format for efficiency reasons, but we'll want a design that doesn't guarantee that all operations on a given format will produce results of the same format. This is especially relevant when considering operations that produce results with different dimensions than the input, like slicing or extracting a diagonal.
I'm taking this to mean that we don't want to implement every single operation for every single format, we can convert to and return the most appropriate type.
I believe this is wise advice, on the whole. For example:
- Writing/modification is best done in DOK. We could require that users do
arr.asformat('dok')before writing to an array. - Elemwise is best done in CSD or COO (still have some Numba kinks to figure out for CSD). We could automatically convert to and return objects of these formats.
- Reductions are best done in CSD (which basically makes them equivalent to
ufunc.reduceat), but will usually return COO. - Slicing is extremely inefficient in DOK, but can be done after conversion to COO, for example. CSD slicing is also easy.
triu,tril,nonzeroare best in COO, and essentially require conversion before they're actually used.
On the whole, I'd like for these conversions to be automatic. Writing is the only thing I can think of that will require explicit conversion to DOK.
Edit: Link to parallel SciPy-dev thread: https://mail.python.org/pipermail/scipy-dev/2018-May/022834.html
- 主要言語
- Python
- スター
- 670
- フォーク
- 167
- 平均マージ
- 3日 4時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pydata/sparse のほかの issue
-
Bug: full einsum contractions upcast the dtype and count booleans対応中かも @RaphaelFakhri が 17 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
BUG: ufunc outer rejects Python scalar and sequence operands対応中かも @nawaaaaaAaar が 29 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
Bug: slices with a negative step and a negative stop return wrong elements対応中かも @JoeyTan21 が 19 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
pydata/sparse#1019 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
BUG: matmul fails with zero-length broadcast batch dimensions対応中かも @nawaaaaaAaar が 29 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 40/100
メンテナーはふだん 2 日以内に返信
-
BUG: zero-length tensor contractions ignore requested output types対応中かも @nawaaaaaAaar が 29 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
needs-triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
flashinfer-ai/flashinfer#9803 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
oscarbol09/thesisforge#61 ·
-
api bug performance
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
oscarbol09/audiobard#159 ·
-
area:web p2 product:business triage:active type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 89/100
cuadrao-ai/argus#2328 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
nikhilb2/simple_invoicing#907 ·