Skip to content

Commit

Permalink
Fix test_doc_example on big-endian systems (#9949)
Browse files Browse the repository at this point in the history
... by using a fixed-endian input.
  • Loading branch information
QuLogic authored Jan 23, 2025
1 parent 3ba4ce4 commit 10b68c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xarray/tests/test_datatree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1240,8 +1240,12 @@ def test_repr_inherited_dims(self) -> None:
)
def test_doc_example(self) -> None:
# regression test for https://github.com/pydata/xarray/issues/9499
time = xr.DataArray(data=["2022-01", "2023-01"], dims="time")
stations = xr.DataArray(data=list("abcdef"), dims="station")
time = xr.DataArray(
data=np.array(["2022-01", "2023-01"], dtype="<U7"), dims="time"
)
stations = xr.DataArray(
data=np.array(list("abcdef"), dtype="<U1"), dims="station"
)
lon = [-100, -80, -60]
lat = [10, 20, 30]
# Set up fake data
Expand Down

0 comments on commit 10b68c3

Please sign in to comment.