JuliaArrays / JuliaArrays/AxisArrays.jl
Feature Request: Rational index should be interpreted categorically
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 207
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
Example:
julia> x = AxisArray(rand(3), foo=[1//2, 1//3, 1//4])
julia> x[foo=atvalue(1//2)]
ERROR: BoundsError: attempt to access 3-element Array{Rational{Int64},1} at index [TolValue(1//2, tol=0//1)]
Seems to me that this should work the same way it does for symbols.
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 reproducing the Julia example with an AxisArray whose foo axis contains rational values, then inspect the existing categorical indexing path used for symbols and the handling of atvalue. Done means x[foo=atvalue(1//2)] selects the matching element rather than raising a BoundsError, with coverage for rational axis values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100