SharedArrays lacking a lot of functions


#1

I was using SharedArray’s recently and tried something as simple as maximum on a SharedArray yet this and many other basic function for working with arrays are lacking with shared arrays.


#2

I wouldn’t expect max or min to work. Have you tried maximum and minimum?


#3

yes I meant maximum sorry the typo, edit above


#4

What doesn’t work then?

julia> a = SharedArray{Float64}(2, 2)
2×2 SharedArray{Float64,2}:
 0.0  0.0
 0.0  0.0

julia> maximum(a)
0.0

#5

right…

what about

julia> any!(SharedArray{Bool}(4,4))
julia> all!(SharedArray{Bool}(4,4))

can we expect SharedArray to support that?


#6

No. You should actually look at the error printed. Those don’t work with Arrays either. Which one are you looking for?

julia> any(SharedArray{Bool}(4, 4))
false

julia> any!(SharedArray{Bool}(4, 4), SharedArray{Bool}(4,4))
4×4 SharedArray{Bool,2}:
 false  false  false  false
 false  false  false  false
 false  false  false  false
 false  false  false  false