Coords

class of dascore.core.patch source

Coords(
    coords ,
    dims ,
)

A class to simplify the handling of coordinates.

Also helps in supporting non-dimensional coordinates and inferring dimensions.

Attributes

array_dict A dict of {coord_name: array}. dims_dict A dict of {coord_name: tuple[dim_1, dim_2…]}. dims A tuple of the dimensions for the coordinates.

Methods

Name Description
get Return item or None if not in coord. Same as dict.get.
to_nested_dict Return a dict of {coord_name: ((*dims), data)}.
update Set the data of an existing coordinate.