diff --git a/src/zarr/storage/_memory.py b/src/zarr/storage/_memory.py index a3fd058680..904be922d7 100644 --- a/src/zarr/storage/_memory.py +++ b/src/zarr/storage/_memory.py @@ -5,6 +5,7 @@ from zarr.abc.store import ByteRequest, Store from zarr.core.buffer import Buffer, gpu +from zarr.core.buffer.core import default_buffer_prototype from zarr.core.common import concurrent_map from zarr.storage._utils import _normalize_byte_range_index @@ -79,10 +80,12 @@ def __eq__(self, other: object) -> bool: async def get( self, key: str, - prototype: BufferPrototype, + prototype: BufferPrototype | None = None, byte_range: ByteRequest | None = None, ) -> Buffer | None: # docstring inherited + if prototype is None: + prototype = default_buffer_prototype() if not self._is_open: await self._open() assert isinstance(key, str)