import dascore # import dascore library
= dascore.get_example_patch() # generate example patch
pa
# Transpose the time and data array dimensions in the example patch
= pa.transpose("time", "distance")
out
# Set "distance" as the last dimension
= pa.transpose(..., "distance")
out
# Set distance as the first dimension.
= pa.transpose("distance", ...) out
transpose
transpose(
self: Patch ,
*dims: str ,
)-> ‘PatchType’
Transpose the data array to any dimension order desired.
Parameters
Parameter | Description |
---|---|
*dims |
Dimension names which define the new data axis order. Can also include … to indicate diemsnions that should be left alone. |