Skip to content

Make CartesianIndexs broadcast like scalars? #38432

@Sleort

Description

@Sleort

Following this Discourse discussion, I'd like to propose to make CartesianIndexs broadcast like scalars. That is, since

julia> 1 .+ (2, 3)
(3, 4)

works, so should

julia> CartesianIndex(1,1) .+ (CartesianIndex(2,2), CartesianIndex(3,3))

(which currently errors, but should, in my opinion, result in (CartesianIndex(3, 3), CartesianIndex(4, 4)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    broadcastApplying a function over a collection

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions