use variable assignment to do "copy"
This commit is contained in:
parent
eaacec852f
commit
de7623ac94
@ -43,7 +43,7 @@ end
|
||||
|
||||
Base.print_array(io::IO, x::TrackedArray) = Base.print_array(io, data(x))
|
||||
|
||||
Base.copy(x::TrackedArray) = copy(data(x))
|
||||
Base.copy(x::TrackedArray) = x
|
||||
|
||||
Base.setindex!(xs::TrackedArray, v, i...) =
|
||||
error("Can't differentiate `setindex!`")
|
||||
|
@ -23,9 +23,7 @@ end
|
||||
|
||||
Base.decompose(x::TrackedReal) = Base.decompose(data(x))
|
||||
|
||||
Base.copy(x::TrackedReal) = copy(data(x))
|
||||
|
||||
Base.convert(::Type{T}, x::TrackedReal{S}) where {T<:Real,S} = convert(T, data(x))
|
||||
Base.copy(x::TrackedReal) = x
|
||||
|
||||
Base.convert(::Type{TrackedReal{T}}, x::TrackedReal{T}) where T = x
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user