Skip to content

No method matching deleteat! #40

@pdeffebach

Description

@pdeffebach

I know that ShiftedArrays is lazy, but this was an annoying bug I got today.


julia> x = [1, 2, 3];

julia> y = lag(x);

julia> deleteat!(y, 2)
ERROR: MethodError: no method matching deleteat!(::ShiftedArray{Int64,Missing,1,Array{Int64,1}}, ::Int64)
Closest candidates are:
  deleteat!(::BitArray{1}, ::Integer) at bitarray.jl:935
  deleteat!(::BitArray{1}, ::Any) at bitarray.jl:966
  deleteat!(::SentinelArrays.MissingVector, ::Integer) at /home/peterwd/.julia/packages/SentinelArrays/Ubf17/src/missingvector.jl:45
  ...
Stacktrace:

filter! in DataFrames uses deleteat!. I'm not sure what the solution here is since I think this would require materializing an array. It's an unfortunate error, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions