clouddrift
clouddrift copied to clipboard
🔎 Simplify RaggedArray API
Currently, the RaggedArray
object can be created with:
class RaggedArray:
def __init__(
self,
coords: dict,
metadata: dict,
data: dict,
attrs_global: dict | None = {},
attrs_variables: dict | None = {},
name_dims: dict[str, DimNames] = {},
coord_dims: dict[str, str] = {},
):
We could simplify the required arguments by implementing:
- add a default value for
name_dims = {"rows": "rows", "obs": "obs"}
-
coord_dims
: could this be replaced by a function? The coordinates can either be the size of therows
or theobs
so they could be assigned automatically.