Skip to content

Cropping via ranges results in an array with the same indices as the old array #24

@dsharlet

Description

@dsharlet

In numpy and many other systems, b = a(interval(5, 12)) results in an array where b(x) == a(x + 5) and b has an extent of 7 (and a min of 0).

In array, this doesn't happen. b(x) == a(x), where b has a min of x.min() + 5 and an extent of 7. The only other system that is similar that I'm aware of is Halide.

This is very convenient for tiling algorithms transparently, but may not be what people would prefer to see in other use cases.

I lean towards the current behavior (which enables transparent tiling of algorithms), but it would be good to find a way to seamlessly enable the numpy style as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions