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

RFC: support iteration for CartesianIndex #48404

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jan 25, 2023

  1. RFC: support iteration for CartesianIndex

    I'm almost certain this came up before, but wasn't able to find the
    discussion. I think now that the multidimensional indexing API has
    matured a bit, the potential for confusion when allowing iteration is
    excedingly low. With this change, it's possible to destructure
    `CartesianIndex` objects without having to convert them to a tuple,
    which I feel currently makes writing such code unnecessarily annoying.
    
    This also makes `CartesianIndex` broadcast like a scalar which I felt
    was consistent with the behavior for objects like `Pair`, but I am open
    to other suggestions.
    simeonschaub committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    c972c3e View commit details
    Browse the repository at this point in the history
  2. fix tests

    simeonschaub committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    7b51502 View commit details
    Browse the repository at this point in the history