Skip to content

Commit e4ad579

Browse files
committed
fix deprecation
1 parent acdd892 commit e4ad579

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zarr/codecs/vlen_utf8.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async def _decode_single(
5050
raw_bytes = chunk_bytes.as_array_like()
5151
decoded = _vlen_utf8_codec.decode(raw_bytes)
5252
assert decoded.dtype == np.object_
53-
decoded.shape = chunk_spec.shape
53+
decoded = decoded.reshape(chunk_spec.shape)
5454
as_string_dtype = decoded.astype(chunk_spec.dtype.to_native_dtype(), copy=False)
5555
return chunk_spec.prototype.nd_buffer.from_numpy_array(as_string_dtype)
5656

@@ -95,7 +95,7 @@ async def _decode_single(
9595
raw_bytes = chunk_bytes.as_array_like()
9696
decoded = _vlen_bytes_codec.decode(raw_bytes)
9797
assert decoded.dtype == np.object_
98-
decoded.shape = chunk_spec.shape
98+
decoded = decoded.reshape(chunk_spec.shape)
9999
return chunk_spec.prototype.nd_buffer.from_numpy_array(decoded)
100100

101101
async def _encode_single(

0 commit comments

Comments
 (0)