Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select on 2 dimensional indices/How to define indices correctly? #3662

Closed
meteoDaniel opened this issue Jan 4, 2020 · 2 comments
Closed

Comments

@meteoDaniel
Copy link

MCVE Code Sample

ds = xarray.tutorial.open_dataset('rasm').load() 
ds.sel(yc=50, xc=50, method='nearest') 

Expected Output

An interpolated timeseries of data closest to 50, 50.

Problem Description

How do I have to define the indices that I can select on multi dimensional indices?

Output of xr.show_versions()

# Paste the output here xr.show_versions() here xarray==0.11.3
@meteoDaniel
Copy link
Author

Is anybody able to answer this question?

@dcherian
Copy link
Contributor

This is not possible right now unfortunately. It should be possible to implement once #1603 is done.

In the mean time, you could use where (https://xarray.pydata.org/en/stable/indexing.html#masking-with-where)

@dcherian dcherian closed this as completed Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants