Skip to content

Make CartesianIndexs broadcast like scalars?Β #38432

Closed
@Sleort

Description

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)))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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