Skip to content

deleteat! by CartesianIndex #41170

Closed
Closed
@wangl-cc

Description

@wangl-cc

I try to remove the item of vector at a CartesianIndex, like

julia> deleteat!([1, 2], CartesianIndex(1))
ERROR: iteration is deliberately unsupported for CartesianIndex. Use `I` rather than `I...`, or use `Tuple(I)...`

It seems that a CartesianIndex is treated as an iterator of indices instead of an index, and there is not a method like deleteat!(a::Vector, ind:: CartesianIndex).
Is it possible to add a method deleteat!(a::Vector, ind:: CartesianIndex)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrays[a, r, r, a, y, s]

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions