Map! for Zygote.Buffer

map!(f,y,x) wants y::AbstractArray which means it doesn’t work on Zygote.Buffer.

I want to use map! and I’m wondering if that constraint can be removed to solve the problem.

using Zygote
julia> let xs = rand(5), ys = Zygote.Buffer(xs)
           map!(exp, ys, xs)
       end
ERROR: MethodError: no method matching map!(::typeof(exp), ::Zygote.Buffer{Float64, Vector{Float64}}, ::Vector{Float64})

Closest candidates are:
  map!(::Any, ::GPUArraysCore.AnyGPUArray, ::AbstractArray...)
   @ GPUArrays ~/.julia/packages/GPUArrays/qt4ax/src/host/broadcast.jl:120
  map!(::F, ::AbstractArray, ::AbstractArray, ::AbstractArray) where F
   @ Base abstractarray.jl:3319
  map!(::F, ::AbstractArray, ::AbstractArray) where F
   @ Base abstractarray.jl:3276