Skip to content
Discussion options

You must be logged in to vote

Dear Ianis, Thank you for this very first technical question abour Xdas on github discussions !

You can definitevely perform index based selection with the Dataarray.isel method. For example:

da.isel(time=<something>)

This will check what is the axis corresponding to the time dimension. Let's imagine the time dimension is the first one in that case it will perform:

da[<something>]

if time is the second dimension it will perform this instead:

da[:, <something>]

and so on.

Now about the <something> part. What you can do or can't do depend on the type of coordinate an data objects the DataArray is composed of. In most cases it should work fine and all the type of indexing supported by Numpy …

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ianis-g
Comment options

Answer selected by ianis-g
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
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