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

Convert range type in reduced_index #34770

Merged
merged 2 commits into from
Feb 21, 2020
Merged

Convert range type in reduced_index #34770

merged 2 commits into from
Feb 21, 2020

Commits on Feb 15, 2020

  1. Convert range type in reduced_index

    The `reduced_indices` and `reduced_indices0` methods sometimes assert
    that the return axes type is the same as the input.
    Consequently, the implementation of `reduced_index` had better
    return a range of the same type as the input.
    
    This corrects the error in
    JuliaArrays/OffsetArrays.jl#92.
    I'll put a workaround in OffsetArrays.jl too.
    timholy committed Feb 15, 2020
    Configuration menu
    Copy the full SHA
    eda4131 View commit details
    Browse the repository at this point in the history
  2. Consistently assert type-equality in reduced_indices

    This risks making these routines more fragile in cases where
    `reduced_index` is broken. However, this can be viewed as a good
    thing because it increases the odds that errors will be caught early.
    
    Moreover, it ensures that the return type is inferrable in cases
    where the reduction is over the first dimension but constant-propagation
    fails to detect this.
    timholy committed Feb 15, 2020
    Configuration menu
    Copy the full SHA
    55dab67 View commit details
    Browse the repository at this point in the history