separate_coord_info

function of dascore.utils.attrs source

separate_coord_info(
    obj ,
    dims: tuple[tuple[str, …], None] = None,
    required: collections.abc.Sequence[collections.abc.Sequence[str], None] = None,
    cant_be_alone: tuple[str, …] = (‘units’, ‘dtype’),
)-> ‘tuple[dict, dict]’

Separate coordinate information from attr dict.

These can be in the flat-form (ie {time_min, time_max, time_step, …}) or a nested coord: {coords: {time: {min, max, step}}

Parameters

Parameter Description
obj The object or model to
dims The dimension to look for.
required If provided, the required attributes (e.g., min, max, step).
cant_be_alone names which cannot be on their own.

Returns

coord_dict and attrs_dict.