Skip to content

utils.coords.split_coords

Import path: earth2studio.utils.coords.split_coords

View source on GitHub

Documentation

A utility function to split a dimension from a (x,coords) pair and convert it into a list of tensors, a CoordSystem, and the dimension that extract from coords.

Parameters:

  • x (Tensor) –

    Input tensor

  • coords (CoordSystem) –

    Coordinates referring to the dimensions of x

  • dim (str, default: 'variable' ) –

    Name of the dimension in coords to split along

Returns:

  • list[Tensor] –

    List of tensors extracted by splitting the extracted dimension from coords.

  • CoordSystem –

    The updated coord system with the extracted dimension removed.

  • ndarray –

    The values of the dimension extracted from the coordinate system.