Two small JAX-related cleanups
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read src/array_api_extra/_lib/_helpers.py around the JAX capabilities() workaround and src/array_api_extra/_agnostic/_set.py around nunique. The issue leaves removal of the workaround contingent on deciding whether to support JAX versions below 0.6.0, so first check project policy and tests. Done means the comments accurately describe JAX's unique_counts behavior, and any shim or minimum-version documentation reflects the project's support decision.
索引モデルが issue の本文から書いたものです。
説明
1. Drop the capabilities() shim for jax < 0.6.0?
_helpers.capabilities forces "boolean indexing" to False for JAX. This works around jax-ml/jax#27418, which was fixed in JAX 0.6.0 (March 2025). CI pins jax >= 0.10.2, so this branch never runs there (it is marked # pragma: no cover).
The package doesn't declare a minimum JAX version, so whether to remove it is a policy question: do we still want to support JAX < 0.6.0 at runtime? If not, the branch can be deleted:
out = xp.__array_namespace_info__().capabilities()
if _compat.is_torch_namespace(xp):
...
Removing it would also be a good moment to document a minimum supported JAX version.
2. Inaccurate comment in nunique
# 3. backend does not have unique_counts; e.g. wrapped JAX
JAX does have unique_counts. It takes the O(n log n) sort-based path because capabilities()["data-dependent shapes"] is False (the output shape of unique_counts can't be known under jax.jit). Also, JAX is no longer "wrapped": jax.numpy is used directly. Suggested wording:
# 3. backend lacks data-dependent shapes, so unique_counts is unusable
# (e.g. JAX, whose output shape can't be known under jax.jit)
The comment just below it, # xp does not have unique_counts; O(n*logn) complexity, should be updated the same way.
- 主要言語
- Python
- スター
- 33
- フォーク
- 33
- 平均マージ
- 1時間 16分
- マージ済み PR(30日)
- 32
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
data-apis/array-api-extra のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
data-apis/array-api-extra#1005 · コメント 15 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement new function
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
data-apis/array-api-extra#992 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
data-apis/array-api-extra#1014 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ENH, TST: Add support for MLX as array backend対応中かも @prady0t が 4 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
data-apis/array-api-extra#1006 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
data-apis/array-api-extra#1002 ·
メンテナーはふだん 1 日以内に返信
data-apis/array-api-extra の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Deepak3699/Ai_Mentor#244 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
btclib-org/btclib-node#1880 ·
メンテナーはふだん 1 日以内に返信
-
CONTRIBUTING.md: say how ticketless bug fixes and feature PRs are handled対応中かも @khuisman が今日担当しました。 オープンv0.9.2
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
khuisman/mcp-gee-sweet#941 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pyjanitor-devs/pyjanitor#1758 ·
メンテナーはふだん 1 日以内に返信
-
bug ready for review
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
odysseus-dev/odysseus#6641 ·
メンテナーはふだん 1 日以内に返信