From 4943be2a455125df8d9631f12cc1aea605e1c6f1 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Sat, 24 Aug 2024 15:44:00 -0500 Subject: [PATCH] fixup --- src/zarr/codecs/crc32c_.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zarr/codecs/crc32c_.py b/src/zarr/codecs/crc32c_.py index f7cc02edad..f9e9ce4d1a 100644 --- a/src/zarr/codecs/crc32c_.py +++ b/src/zarr/codecs/crc32c_.py @@ -53,7 +53,7 @@ async def _encode_single( ) -> Buffer | None: data = chunk_bytes.as_numpy_array() # Calculate the checksum and "cast" it to a numpy array - checksum = np.array([crc32c(data)], dtype=np.uint32) # type: ignore[arg-type] + checksum = np.array([crc32c(cast(typing_extensions.Buffer, data))], dtype=np.uint32) # Append the checksum (as bytes) to the data return chunk_spec.prototype.buffer.from_array_like(np.append(data, checksum.view("b")))