Skip to content

Commit

Permalink
lets try a different dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Sep 27, 2024
1 parent 9e35d1d commit 188f59e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xarray/tests/test_namedarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,12 @@ def test_warn_on_repeated_dimension_names(self) -> None:


def test_repr() -> None:
x: NamedArray[Any, np.dtype[np.int64]]
x = NamedArray(("x",), np.array([1, 2, 3], dtype=np.int64))
x: NamedArray[Any, np.dtype[np.uint64]]
x = NamedArray(("x",), np.array([0], dtype=np.uint64))

# Reprs should not crash:
r = x.__repr__()
x._repr_html_()

# Basic comparison:
assert r == "<xarray.NamedArray (x: 3)> Size: 24B\narray([1, 2, 3])"
assert r == "<xarray.NamedArray (x: 1)> Size: 8B\narray([0], dtype=uint64)"

0 comments on commit 188f59e

Please sign in to comment.