Skip to content

Commit 996fbc0

Browse files
committed
update error message
1 parent 7af3a16 commit 996fbc0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/zarr/core/buffer/gpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(self, array_like: ArrayLike) -> None:
5959
if array_like.ndim != 1:
6060
raise ValueError("array_like: only 1-dim allowed")
6161
if array_like.dtype.itemsize != 1:
62-
raise ValueError("array_like: only byte dtype allowed")
62+
raise ValueError("array_like: only dtypes with itemsize=1 allowed")
6363

6464
if not hasattr(array_like, "__cuda_array_interface__"):
6565
# Slow copy based path for arrays that don't support the __cuda_array_interface__

tests/test_buffer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def test_gpu_buffer_raises() -> None:
195195
gpu.Buffer(arr)
196196

197197
arr = cp.arange(12, dtype="int32")
198-
with pytest.raises(ValueError, match="array_like: only byte dtype allowed"):
198+
with pytest.raises(ValueError, match="array_like: only dtypes"):
199199
gpu.Buffer(arr)
200200

201201

0 commit comments

Comments
 (0)