Skip to content

Commit abf600c

Browse files
author
Rene Donner
committed
fix sharedarray indexing regression
1 parent b3a1be5 commit abf600c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

base/sharedarray.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ end
280280
convert(::Type{Array}, S::SharedArray) = S.s
281281

282282
# pass through getindex and setindex! - unlike DArrays, these always work on the complete array
283-
getindex(S::SharedArray, I::Real) = getindex(S.s, I)
283+
getindex(S::SharedArray, i...) = getindex(S.s, i...)
284284

285-
setindex!(S::SharedArray, x, I::Real) = setindex!(S.s, x, I)
285+
setindex!(S::SharedArray, x, i...) = setindex!(S.s, x, i...)
286286

287287
function fill!(S::SharedArray, v)
288288
vT = convert(eltype(S), v)

test/parallel.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ for p in procs(d)
9797
@test d[idxl] == p
9898
end
9999

100+
d = SharedArray(Float64, (2,3))
101+
@test isa(d[:,2], Vector{Float64})
102+
100103
### SharedArrays from a file
101104

102105
# Mapping an existing file

0 commit comments

Comments
 (0)