Skip to content

Pointwise indexing -- something like sel_points #214

Closed
@shoyer

Description

@shoyer

@hdail suggested that it would be useful to be able to index points in addition to indexing dimensions separately. Right now, you can do this via something like:
xray.concat([ds.sel(x=x, y=y) for x, y in pts], dim='station')

This would be handy for sampling particular points out of multiple dimensions, e.g., to compare gridded and station data.

It's also probably worth implementing in xray because it can be done quickly using numpy's fancy indexing (I think) which would be more efficient than a loop, though I suspect the implementation is probably somewhat complex.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions