I am trying to initialize an array of arrays using similar and Zygote.buffer.
If I initialize an array the functions work as expected, i.e.
a = [0., 0.]
similar(a)
2-element Array{Float64,1}:
7.229478454414514e221
2.00297683e-315
when I enter an array of arrays as input, I would expect it to output an array of arrays, instead the function returns an array of undefined:
a = [[0.,0.],[0.,0.]]
similar(a)
2-element Array{Array{Float64,1},1}:
#undef
#undef
The Zygote.Buffer function acts in the same fashion.
What am I missing here?
Thanks!