JuliaArrays / JuliaArrays/AxisArrays.jl
Can AxisVector support push!/pop!/deleteat! ?
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 207
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
This seems currently not implemented (by also looking inside the library):
julia> a = AxisArray([1,2,3], [4,5,7])
julia> push!(a, 4, 8) # not sure actually how to do it
ERROR: MethodError: no method matching resize!(::AxisVector{Int64, Vector{Int64}, Tuple{Axis{:row, Vector{Int64}}}}, ::Int64)
Closest candidates are:
resize!(::BitVector, ::Integer)
@ Base bitarray.jl:814
resize!(::Vector, ::Integer)
@ Base array.jl:1312
Stacktrace:
[1] _append!(a::AxisVector{Int64, Vector{Int64}, Tuple{Axis{:row, Vector{…}}}}, ::Base.HasLength, iter::Tuple{Int64, Int64})
@ Base ./array.jl:1196
[2] append!(a::AxisVector{Int64, Vector{Int64}, Tuple{Axis{:row, Vector{Int64}}}}, iter::Tuple{Int64, Int64})
@ Base ./array.jl:1187
[3] push!(::AxisVector{Int64, Vector{Int64}, Tuple{Axis{:row, Vector{Int64}}}}, ::Int64, ::Int64)
@ Base ./array.jl:1188
[4] top-level scope
@ REPL[61]:1
Some type information was truncated. Use `show(err)` to see complete types.
Can these methods be supported?
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 with the AxisVector implementation in the AxisArrays library and reproduce the push! example from the issue. Determine how push!, pop!, and deleteat! should update both values and axis metadata, then verify that these operations work for AxisVector without the resize! MethodError shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100