Skip to content

Support reversing with .isel #35

@dcherian

Description

@dcherian

Adding

ds.isel(y=slice(None, None, -1))

to https://github.com/dcherian/rasterix/blob/d6242e173e691fb3a017c42dbeca1a77c72184fb/tests/test_raster_index.py#L31

fails with

../../miniforge3/envs/rasterix/lib/python3.12/site-packages/xarray/core/indexes.py:2097: in _apply_indexes
    new_index = getattr(index, func)(index_args)
src/rasterix/raster_index.py:408: in isel
    return RasterIndex(new_indexes)
src/rasterix/raster_index.py:344: in __init__
    "x": self._wrapped_indexes["x"].axis_transform.size,
E   KeyError: 'x'

I suspect this is fixed on #31, but we should add a test

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions