-
Hi all |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Could you please review the issue template re a MVCE? |
Beta Was this translation helpful? Give feedback.
-
i am not yet experimenting enough on python. My problem is that I wrote some code to draw a line using a colon at the beginning and at the end of my line I used numpy exclusively and since it is an xrarray array it takes me a long time. My data is all of dimensions lat, lon, SST, (1501,2001), and here is my code:
My question is, isn't there a way to make it simpler and faster, especially thank you very much in advance. |
Beta Was this translation helpful? Give feedback.
-
I recommend looking at
This webpage might also be useful: https://xarray.pydata.org/en/stable/user-guide/indexing.html#more-advanced-indexing |
Beta Was this translation helpful? Give feedback.
I recommend looking at
.query
and.isin
.transect = data_sst.SST.where (mask_lon & mask_lat, drop = True)
looks like it could work. Did you try it?This webpage might also be useful: https://xarray.pydata.org/en/stable/user-guide/indexing.html#more-advanced-indexing