Skip to content

Possible to select by label with integer slices from an integer dimension coordinate? #9547

Closed Answered by benbovy
blakeNaccarato asked this question in Q&A
Discussion options

You must be logged in to vote

I haven't looked at your notebook gist yet, but from what I can read here this Range1DIndex custom index example may be relevant: #9543 (comment).

(Note: that example only works within the context the draft PR where it has been shown).

A coordinate associated with this index is lazy, so da.frames[-1] will only compute the last frame index.

I think you could pretty easily customize it so it handles slice steps the way you want. If that behavior makes sense in the general case we might also consider supporting it in Xarray.

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@benbovy
Comment options

Answer selected by blakeNaccarato
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants