JuliaArrays / JuliaArrays/AxisArrays.jl
return default value such as 0 or NaN instead of throwing BoundsError
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 207
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the array lookup behavior described for array a and the linked DefaultDict and DefaultOrderedDict documentation. Define the desired default-value API and its behavior when no value is found near a given index; done should mean the lookup returns the configured value, such as 0 or NaN, instead of throwing BoundsError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100