Instantiating a SharedArray with a Vector{Float64}

question

#1

I can initialize a SharedArray the usual way

SharedArray(Float64, (180, 1))

and get an empty shared array. However, I would like to initialize the array by casting an already existing vector to the shared array. Is this possible?


#2

Did you find an answer?
I also wonder the answer of this question.


#3

Can’t you just do:

julia> x = rand(10);

julia> y = SharedArray{Float64}(length(x));

julia> y .= x
10-element SharedArray{Float64,1}:
 0.785796
 0.656855
 0.428733
 0.873864
 0.703221
 0.371945
 0.460474
 0.493993
 0.974941
 0.0194398

?


#4

@rdeits, thank you for your answer.
But I do not know whether the constructor of SharedArray always generates an array filled with zeros.