Say we have arrays u and v and a function f. We need a matrix F consisting of f (ui, vi) for all terms u and v. Attempt:
F = [ [f(ui,vi) for vi in v] for ui in u]
The result is an array of arrays (in the words of Julia, Array{Array{Int64,1},1})
How can I convert this to a two-dimensional array? ( Array{Int64,2})
source
share