Create x/y Xarray coordinate variables from a simple coordinate transform.
(scale: float, shape: tuple[int, int])
| 81 | |
| 82 | |
| 83 | def 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 | |
| 90 | def test_coordinate_transform_variable() -> None: |
no test coverage detected
searching dependent graphs…