OffsetArrays.jl icon indicating copy to clipboard operation
OffsetArrays.jl copied to clipboard

BoundsError on type-unstable map

Open yha opened this issue 4 years ago • 1 comments

Each of these lines

map(!, OffsetArray([true,missing],2))
map(x -> x>1 ? 1 : nothing, OffsetArray(1:2,2))

errors with

BoundsError: attempt to access 2-element OffsetArray(::Array{Union{Missing, Bool},1}, 3:4) with eltype Union{Missing, Bool} with indices 3:4 at index [3:5]

yha avatar Mar 23 '20 16:03 yha

Fixed by https://github.com/JuliaLang/julia/pull/35298. We'll need a workaround here for older Julia versions.

timholy avatar Mar 29 '20 09:03 timholy