JuliaArrays / AxisArrays.jl

Performant arrays where each dimension can have a named axis with values
http://JuliaArrays.github.io/AxisArrays.jl/latest/
Other
200 stars 41 forks source link

return default value such as 0 or NaN instead of throwing BoundsError #207

Open gszep opened 2 years ago

gszep commented 2 years ago

Is there a way to return a default value such as NaN or 0 instead of throwing a BoundsError when there is no value within array a in the vicinity of a given index? Similar to the behaviour of DefaultDict and DefaultOrderedDict · DataStructures.jl