Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`map` of a `TrackedArray` and a `StaticArray` is ambiguous

オープン
#309 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
julia
領域
backend

調査の方向性

Start in src/derivatives/elementwise.jl and inspect ReverseDiff's map and broadcast methods for DiffRules and SKIPPED_BINARY_SCALAR_FUNCS, then compare the related fixes in issues #307 and #153. Run the reproducer with StaticArrays to confirm the ambiguity. Done means the shown gradient call no longer raises the ambiguous map MethodError.

索引モデルが issue の本文から書いたものです。

説明

using ReverseDiff, StaticArrays
ReverseDiff.gradient(x -> sum(map(+, x, SVector(1.0, 2.0))), [3.0, 4.0])
MethodError: map(::typeof(+), ::ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}, ::SVector{2, Float64}) is ambiguous.

ReverseDiff defines map (and broadcast) methods for the functions in DiffRules and SKIPPED_BINARY_SCALAR_FUNCS, with the untracked argument typed as each entry of ARRAY_TYPES (src/derivatives/elementwise.jl). These methods cross StaticArrays' map(f, ::StaticArray, ::AbstractArray...). It's the same kind of ambiguity as the +/-/* ones fixed in #307 (#153).

🤖 Generated with Claude Code

主要言語
Julia
スター
397
フォーク
62
平均マージ
12時間 50分
マージ済み PR(30日)
8

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JuliaDiff/ReverseDiff.jl のほかの issue

JuliaDiff/ReverseDiff.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。