@@ -46,34 +46,11 @@ class NullTerminatedBytes(ZDType[np.dtypes.BytesDType[int], np.bytes_], HasLengt
4646
4747 Attributes
4848 ----------
49- length : int
50- The length of the bytes.
51-
5249 dtype_cls: ClassVar[type[np.dtypes.BytesDType[int]]] = np.dtypes.BytesDType
5350 The NumPy data type wrapped by this ZDType.
54-
55- Methods
56- -------
57- to_json(zarr_format) : dict
58- Convert the NullTerminatedBytes to JSON data.
59-
60- from_json(data, zarr_format) : NullTerminatedBytes
61- Create NullTerminatedBytes from JSON data.
62-
63- cast_scalar(data) : np.bytes_
64- Cast a python object to np.bytes_.
65-
66- default_scalar() : np.bytes_
67- Return the default scalar value.
68-
69- to_json_scalar(data, zarr_format) : str
70- Convert input to a scalar and return as JSON data.
71-
72- from_json_scalar(data, zarr_format) : np.bytes_
73- Create np.bytes_ from JSON data.
74-
75- item_size : int
76- Return the item size, in bytes, of the data type.
51+ _zarr_v3_name : ClassVar[Literal["null_terminated_bytes"]]
52+ length : int
53+ The length of the bytes.
7754
7855 Notes
7956 -----
@@ -380,7 +357,7 @@ def to_json_scalar(self, data: object, *, zarr_format: ZarrFormat) -> str:
380357
381358 def from_json_scalar (self , data : JSON , * , zarr_format : ZarrFormat ) -> np .bytes_ :
382359 """
383- Read a JSON-serializable value as np.bytes_.
360+ Read a JSON-serializable value as `` np.bytes_`` .
384361
385362 Parameters
386363 ----------
@@ -431,34 +408,11 @@ class RawBytes(ZDType[np.dtypes.VoidDType[int], np.void], HasLength, HasItemSize
431408
432409 Attributes
433410 ----------
434- length : int
435- The length of the bytes.
436-
437411 dtype_cls: ClassVar[type[np.dtypes.VoidDType[int]]] = np.dtypes.VoidDtype
438412 The NumPy data type wrapped by this ZDType.
439-
440- Methods
441- -------
442- to_json(zarr_format) : dict
443- Convert RawBytes to JSON data.
444-
445- from_json(data, zarr_format) : NullTerminatedBytes
446- Create RawBytes from JSON data.
447-
448- cast_scalar(data) : np.void
449- Cast a python object to np.void.
450-
451- default_scalar() : np.void
452- Return the default scalar value.
453-
454- to_json_scalar(data, zarr_format) : str
455- Convert input to a scalar and return as JSON data.
456-
457- from_json_scalar(data, zarr_format) : np.bytes_
458- Create a np.void from JSON data.
459-
460- item_size : int
461- Return the item size, in bytes, of the data type.
413+ _zarr_v3_name : ClassVar[Literal["raw_bytes"]]
414+ length : int
415+ The length of the bytes.
462416
463417 Notes
464418 -----
@@ -851,26 +805,10 @@ class VariableLengthBytes(ZDType[np.dtypes.ObjectDType, bytes], HasObjectCodec):
851805 ----------
852806 dtype_cls: ClassVar[type[np.dtypes.ObjectDType]] = np.dtypes.ObjectDType
853807 The NumPy data type wrapped by this ZDType.
854-
855- Methods
856- -------
857- to_json(zarr_format) : dict
858- Convert the VariableLengthBytes to JSON data.
859-
860- from_json(data, zarr_format) : VariableLengthBytes
861- Create VariableLengthBytes from JSON data.
862-
863- cast_scalar(data) : bytes
864- Cast a python object to bytes.
865-
866- default_scalar() : bytes
867- Return the default scalar value.
868-
869- to_json_scalar(data, zarr_format) : str
870- Convert input to a scalar and return as JSON data.
871-
872- from_json_scalar(data, zarr_format) : bytes
873- Create bytes from JSON data.
808+ _zarr_v3_name: ClassVar[Literal["variable_length_bytes"]] = "variable_length_bytes"
809+ The name of this data type in Zarr V3.
810+ object_codec_id: ClassVar[Literal["vlen-bytes"]] = "vlen-bytes"
811+ The object codec ID for this data type.
874812
875813 Notes
876814 -----
0 commit comments