From 5881c3e2f9beaa356b4926f6948a72c4e1ef7416 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 7 Jan 2025 11:26:16 -0500 Subject: [PATCH] fix: missing copyto! --- src/TracedRArray.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/TracedRArray.jl b/src/TracedRArray.jl index fe7ba4db2..e55a6d76f 100644 --- a/src/TracedRArray.jl +++ b/src/TracedRArray.jl @@ -483,6 +483,10 @@ function Base.copyto!(dest::TracedRArray{T,N}, src::TracedRArray{T,N}) where {T, return dest end +function Base.copyto!(dest::TracedRArray{T,N}, src::TracedRArray{T2,N}) where {T,N} + return copyto!(dest, Ops.convert(TracedRArray{T,N}, src)) +end + function _copyto!(dest::AnyTracedRArray, bc::Broadcasted) axes(dest) == axes(bc) || Broadcast.throwdm(axes(dest), axes(bc)) isempty(dest) && return dest