OffsetArrays.jl
OffsetArrays.jl copied to clipboard
BoundsError on type-unstable map
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]
Fixed by https://github.com/JuliaLang/julia/pull/35298. We'll need a workaround here for older Julia versions.