File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 72
72
ZDTypeLike ,
73
73
parse_data_type ,
74
74
)
75
- from zarr .core .dtype .common import HasItemSize
75
+ from zarr .core .dtype .common import HasEndianness , HasItemSize
76
76
from zarr .core .indexing import (
77
77
BasicIndexer ,
78
78
BasicSelection ,
@@ -4731,7 +4731,7 @@ def _parse_chunk_encoding_v3(
4731
4731
# TODO: ensure that the serializer is compatible with the ndarray produced by the
4732
4732
# array-array codecs. For example, if a sequence of array-array codecs produces an
4733
4733
# array with a single-byte data type, then the serializer should not specify endiannesss.
4734
- if isinstance (out_array_bytes , BytesCodec ) and dtype . to_dtype (). itemsize == 1 :
4734
+ if isinstance (out_array_bytes , BytesCodec ) and not isinstance ( dtype , HasEndianness ) :
4735
4735
# The default endianness in the bytescodec might not be None, so we need to replace it
4736
4736
out_array_bytes = replace (out_array_bytes , endian = None )
4737
4737
return out_array_array , out_array_bytes , out_bytes_bytes
You can’t perform that action at this time.
0 commit comments