mcabbott / mcabbott/AxisKeys.jl
sortkeys() changes key container type
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 154
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
I think it is reasonable to expect that sorting keys should not change the key container type. This is not currently the case:
using AxisKeys, UniqueVectors
a = wrapdims(rand(2), UniqueVector, x=1:2)
println(typeof(axiskeys(a,:x)))
a = sortkeys(a)
println(typeof(axiskeys(a,:x)))
Produces:
UniqueVector{Int64}
Array{Int64,1}
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 locating the sortkeys() entry point in AxisKeys.jl and run the reproduction from the issue using a UniqueVector axis key. Trace how the sorted key is constructed, then verify that sorting preserves the UniqueVector container type rather than returning an Array.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100