Replies: 1 comment 1 reply
-
Yes, I think indexing segments can be improved. Currently, I think the simplest (syntax-wise) way to index an segment is with unpack_ragged(ds.lon, ds.count)[j][n] However, this is quite inefficient if the ragged-array is large.
Yes, this would work if we extended the We could also monkey-patch the A simpler and less intrusive way would be to define standalone functions
|
Beta Was this translation helpful? Give feedback.
-
I am wondering if we could improve indexing within rows. Let's say we start from a ragged array dataset
ds
with a givenrowsize
, we first need to generate a row index, define a slice, then index that slice:How can we simply this to something like
ds.lon[j][n]
which is basically a syntax/functionality that is supported by awkward arrays but not xarray.Is one long haul solution to define new classes such
xarray.RaggedDataArray
andxarray.RaggedDataset
for which we could have.isel
and.sel
methods for double indexing (ds.lon[j][n]
)?Beta Was this translation helpful? Give feedback.
All reactions