My concern is also on parallel code: julia> K = @parallel [dot(X[:,i], X[:,j]) for i=1:5, j=1:5] 5x5 DArray{Any,2,Array{Any,2}}: 1.35134 1.36439 1.28474 1.13181 1.07863 1.36439 1.40077 1.25708 1.22365 1.08332 1.28474 1.25708 1.54494 0.95311 1.15779 1.13181 1.22365 0.95311 1.70348 1.30076 1.07863 1.08332 1.15779 1.30076 1.34577
I expect to get a DArray{Float64,2,Array{Float64,2}} rather than DArray{Any,2,Array{Any,2}} Please help. Rizal On Mon, Nov 9, 2015 at 9:11 AM, rizal zaini <rizal...@gmail.com> wrote: > Hi all > > I want to create matrix containing dot products > > julia> X = rand(5,5) > 5x5 Array{Float64,2}: > 0.274799 0.564619 0.915595 0.341059 0.57361 > 0.0806822 0.293939 0.379279 0.608582 0.652441 > 0.264678 0.532751 0.289088 0.457759 0.492777 > 0.33856 0.495587 0.499099 0.548237 0.402534 > 0.686305 0.168385 0.8322 0.605532 0.518693 > > julia> K = [dot(X[:,i], X[:,j]) for i=1:5, j=1:5] > 5x5 Array{Any,2}: > 0.737716 0.603229 1.09884 0.865174 0.832958 > 0.603229 0.962978 1.16994 0.988988 1.06501 > 1.09884 1.16994 2.00739 1.45298 1.54767 > 0.865174 0.988988 1.45298 1.36347 1.35304 > 0.832958 1.06501 1.54767 1.35304 1.42861 > > I expect to get an Array{Float64,2}, but what I got is Array{Any,2}. > How to get Array{Float64,2} using Array comprehension? > > Thanks before > Rizal >