xarray-contrib / xarray-tutorial

Xarray Tutorials
https://tutorial.xarray.dev/
Apache License 2.0
175 stars 108 forks source link

A few points for improving the indexing notebooks #206

Open negin513 opened 1 year ago

negin513 commented 1 year ago

From today's presentation, I can think of a few things to improve the whole indexing materials:

The right figure here shows it for Numpy/ poinwise indexing: image Here is another one showing the orthogonal indexing:

negin513 commented 1 year ago

Here is another one I have found from Matlab: matlab

dcherian commented 1 year ago

These images are great! Thanks Negin.

negin513 commented 1 year ago

Okay, so I created this for adding to the tutorial, to better explain these concepts:

Untitled drawio (1)

np_arr = np.arange(1, 26).reshape(5, 5)
np_arr [[0, 2, 4], [0, 2, 4]]
da = xr.DataArray(np_arr)
da [[0, 2, 4], [0, 2, 4]]

I will add these to our notebooks soon...