MCPcopy Index your code
hub / github.com/pydata/xarray / create_coords

Function create_coords

xarray/tests/test_coordinate_transform.py:83–87  ·  view source on GitHub ↗

Create x/y Xarray coordinate variables from a simple coordinate transform.

(scale: float, shape: tuple[int, int])

Source from the content-addressed store, hash-verified

81
82
83def create_coords(scale: float, shape: tuple[int, int]) -> xr.Coordinates:
84 """Create x/y Xarray coordinate variables from a simple coordinate transform."""
85 tr = SimpleCoordinateTransform(shape, scale)
86 index = CoordinateTransformIndex(tr)
87 return xr.Coordinates.from_xindex(index)
88
89
90def test_coordinate_transform_variable() -> None:

Calls 3

from_xindexMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…