Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can AxisVector support push!/pop!/deleteat! ? #232

Open
Tortar opened this issue Nov 23, 2024 · 0 comments
Open

Can AxisVector support push!/pop!/deleteat! ? #232

Tortar opened this issue Nov 23, 2024 · 0 comments

Comments

@Tortar
Copy link

Tortar commented Nov 23, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant