Skip to content

Commit

Permalink
rm ensure_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
normanrz committed Oct 18, 2024
1 parent b6faac6 commit c608fef
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/zarr/codecs/_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
from typing import TYPE_CHECKING

import numcodecs
import numcodecs.compat
from numcodecs.compat import ensure_bytes, ensure_ndarray_like
from numcodecs.compat import ensure_ndarray_like

from zarr.abc.codec import ArrayBytesCodec
from zarr.registry import get_ndbuffer_class
Expand Down Expand Up @@ -84,8 +83,6 @@ async def _encode_single(
else:
cdata = chunk

cdata = ensure_bytes(cdata)

return chunk_spec.prototype.buffer.from_bytes(cdata)

def compute_encoded_size(self, _input_byte_length: int, _chunk_spec: ArraySpec) -> int:
Expand Down

0 comments on commit c608fef

Please sign in to comment.