Missing use cases for binops on array vs. scalar
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- testing-qa
調査の方向性
array_api_tests/hypothesis_helpers.py の参照されているセクションから始め、次に test_operators_and_elementwise_functions.py の test_binary_with_scalars_real と test_special_cases.py の test_binary を調べます。生成された入力を、列挙されている整数、特殊値、範囲外のスカラーのケースと比較します。不足しているケースがカバーされ、float/complex の範囲の挙動が明確になれば完了です。
索引モデルが issue の本文から書いたものです。
説明
After reading hh.scalars, I understand that array-api-tests currently never generates the use cases of a binop where one argument is an Array with float or complex dtype and the other argument is
- a pure-python integer;
- a scalar
inf,-inf, ornan; - a scalar outside of the range
[1/64, 64]
Unless I missed something and the tests for these cases are somewhere else?
Note that the [1/64, 64] range exclusively applies to float/complex. The code could use a clarification there as it is not obvious upon first read that integers ignore it.
e.g. pytest -k minimum returns this:
array_api_tests/test_has_names.py::test_has_names[elementwise-minimum] PASSED [ 20%]
array_api_tests/test_operators_and_elementwise_functions.py::test_minimum PASSED [ 40%]
array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real[minimum] SKIPPED (requires ARRAY_API_TESTS_VERSION >= 2024.12) [ 60%]
array_api_tests/test_signatures.py::test_func_signature[minimum] PASSED [ 80%]
array_api_tests/test_special_cases.py::test_binary[minimum(x1_i is NaN or x2_i is NaN) -> NaN] PASSED
To my understanding
- in
test_binary_with_scalars_real, when one arg is Array[float64] or Array[float32], the other arg is always in the[1/64, 64]range; test_special_cases::test_binaryonly tests arrays containing NaN, not scalar NaN;- none tests
infor arrays containinginf
related:
- 主要言語
- Python
- スター
- 74
- フォーク
- 54
- 平均マージ
- 4時間 35分
- マージ済み PR(30日)
- 4
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
data-apis/array-api-tests のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
data-apis/array-api-tests#465 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
data-apis/array-api-tests#460 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
data-apis/array-api-tests#455 · コメント 2 件 ·
-
tracking
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
data-apis/array-api-tests#381 · コメント 9 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
data-apis/array-api-tests#379 · コメント 10 件 ·
data-apis/array-api-tests の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/skills#1811 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
speaches-ai/speaches#678 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
datalayer/mcp-compose#42 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
conda-forge/spacy-feedstock#177 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
UKGovernmentBEIS/inspect_evals#2523 ·