DecodedArray¶
Reading from an Array (via retrieve_array_subset,
retrieve_chunk, or [...]) returns a DecodedArray: one of four concrete result
types, chosen by the decoded byte layout of the dtype. Use isinstance to narrow to
a concrete type before calling its layout-specific methods.
Tensor— fixed-width, dense data.VariableArray— variable-length data (e.g. strings or bytes).MaskedTensor— fixed-width data with a validity mask.MaskedVariableArray— variable-length data with a validity mask.
zarrista.DecodedArray
module-attribute
¶
DecodedArray: TypeAlias = (
Tensor | VariableArray | MaskedTensor | MaskedVariableArray
)
The result of a read: one of the four decoded array layouts.
Which one is returned depends on the dtype's byte layout (fixed vs. variable, and
whether it carries a validity mask). Use isinstance to narrow to a concrete
type before using layout-specific methods.
Tensor¶
zarrista.Tensor ¶
Fixed-width, dense decoded array data.
The decoded bytes are held zero-copy. Reinterpret them as a NumPy array with
to_numpy(), or get the raw bytes as a buffer-protocol object via buffer().
__dlpack__ ¶
__dlpack__(
*,
stream: int | None = None,
max_version: tuple[int, int] | None = None,
dl_device: tuple[int, int] | None = None,
copy: bool | None = None
) -> CapsuleType
Export the data as a DLPack capsule (e.g. for np.from_dlpack).
__dlpack_device__ ¶
Return the DLPack device (device_type, device_id). Always CPU.
VariableArray¶
zarrista.VariableArray ¶
Variable-length decoded data (e.g. strings or bytes).
Exposes the Arrow PyCapsule interface for zero-copy data exchange for variable length string or bytes data.