astropenguin / xarray-dataclasses

:zap: xarray data creation by data classes
https://astropenguin.github.io/xarray-dataclasses/
MIT License
71 stars 4 forks source link

Swap the order of dims and dtype in Coord[...] and Data[...] #31

Closed astropenguin closed 3 years ago

astropenguin commented 3 years ago

Swap the order of dims and dtype s.t. Coord[dims, dtype] and Data[dims, dtype]. This is because their order in the printed format is (dims, dtype, value).

<xarray.DataArray (x: 3, y: 3)>
array([[0., 0., 0.],
       [0., 0., 0.],
       [0., 0., 0.]])
Coordinates:
  * x        (x) int64 0 0 0
  * y        (y) int64 0 0 0