import dascore as dc
= dc.get_example_patch()
patch # Select first 10 distance indices
= patch.iselect(distance=(..., 10))
out1 # Select last time row/column
= patch.iselect(time=-1) out2
iselect
iselect(
patch: Patch ,
copy = False,
**kwargs ,
)-> ‘PatchType’
Return a subset of the patch using index-based query parameters.
Any dimension of the data can be passed as key, and the values should either be a Slice, a tuple of (min_ind, max_ind) or a single int.
Parameters
Parameter | Description |
---|---|
patch | The patch object. |
copy | If True, copy the resulting data. This is needed so the old array can get gc’ed and memory freed. |
**kwargs | Used to specify the dimension and slices to select on. |
See also select. |