What's your problem?
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
まず、説明にリンクされているscipy-stubsのissueと、efax/_src/distributions/complex_normal/complex_normal.pyにあるefaxの例を確認してください。示されているArray APIの型付けの問題を比較し、array-api-typingの改善と統合テストの指針となる代表的なコード例を収集してください。必要なケースが、型付け作業の指針となるのに十分な明確さで記録されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Let's collect a bunch of code samples from array-api libraries that array-api-typing could improve. That should help give us a better idea of what is needed. They should also be useful for (integration) testing.
Problems
scipy-stubs
See https://github.com/scipy/scipy-stubs/issues/140 for all of SciPy's functions that have (at least some) support for the Array API.
Here's an example from the scipy docs
import torch
from scipy.cluster.vq import vq
code_book = torch.tensor([[1., 1., 1.],
[2., 2., 2.]])
features = torch.tensor([[1.9, 2.3, 1.7],
[1.5, 2.5, 2.2],
[0.8, 0.6, 1.7]])
code, dist = vq(features, code_book)
print(code) # tensor([1, 1, 0], dtype=torch.int32)
print(dist) # tensor([0.4359, 0.7348, 0.8307])
There is currently no good way to annotate this behavior in scipy-stubs. Currently, with scipy-stubs==1.15.3.0, code and dist are inferred as 1d numpy arrays of int and float dtypes, respectively. The reason for this is the torch.tensor.__array__ method, cuasing it to be interpreted as a numpy "array-like".
efax
By @NeilGirdhar from https://github.com/data-apis/array-api-typing/issues/22#issuecomment-2973309168
Consider practically any function in my efax library. For example, we have:
def _r_s_mu(self) -> tuple[JaxComplexArray, JaxRealArray, JaxComplexArray]:
xp = array_namespace(self)
r = -self.pseudo_precision / self.negative_precision
s = xp.reciprocal((abs_square(r) - 1.0) * self.negative_precision)
k = self.pseudo_precision / self.negative_precision
l_eta = 0.5 * self.mean_times_precision / ((abs_square(k) - 1.0) * self.negative_precision)
mu = xp.conj(l_eta) - xp.conj(self.pseudo_precision / self.negative_precision) * l_eta
return r, s, mu
This is barely type-checked. It would be nice if xp: ArrayNamespace, r, s, k, l_eta, mu: Array, etc.
- 主要言語
- Python
- スター
- 27
- フォーク
- 6
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
data-apis/array-api-typing のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
data-apis/array-api-typing#70 · コメント 7 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
data-apis/array-api-typing#59 · コメント 4 件 · リアクション 1 件 ·
-
CI + lefthook オープン👷 CI
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
data-apis/array-api-typing#40 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
data-apis/array-api-typing#30 · リアクション 3 件 ·
-
Refactor Test Suite オープン✅ tests
data-apis/array-api-typing#25 · コメント 1 件 · リアクション 1 件 · 担当者 1 名 ·
data-apis/array-api-typing の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
huggingface/Repo2RLEnv#163 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NousResearch/hermes-agent#121143 ·