import numpy as np
import dascore as dc
pa = dc.get_example_patch("random_patch_with_lat_lon")
# Drop non-dimensional coordinate latitude
pa_no_lat = pa.drop_coords("latitude")
# A sequence of names works as well.
pa_no_lat = pa.drop_coords(["latitude"])drop_coords
drop_coords(
self: Patch ,
*coords: str | collections.abc.Iterable[str, collections.abc.Iterable[str]] ,
)-> ‘PatchType’
Update the coordinates of a patch.
Will either add new coordinates, or update existing ones.
Parameters
| Parameter | Description |
|---|---|
| *coords |
One or more coordinates to drop. Each can be a coordinate name or a sequence of them. |