import dascore as dc
= dc.get_example_patch()
patch # roll time dimension 5 elements
= patch.roll(time=5, samples=True)
rolled_patch # roll distance dimension 30 meters(or units of distance in patch)
= patch.roll(distance=30, samples=False)
rolled_patch2 # roll time dimension 5 elements and update coordinates
= patch.roll(time=5, samples=True, update_coord=True) rolled_patch3
roll
roll(
patch ,
samples = False,
update_coord = False,
**kwargs ,
)
Roll patch array elements along a given dimension.
Parameters
Parameter | Description |
---|---|
patch | input patch |
samples | if True, value indicates coordinate or value of dimension |
update_coord | if True, updates coord based on rolled amount |
**kwargs | specifies dimension and number of elements to roll |