Skip to main content

Module data_type

Module data_type 

Source
Expand description

Zarr data types.

See https://zarr-specs.readthedocs.io/en/latest/v3/core/index.html#data-types.

This submodule re-exports much of the zarrs_data_type crate.

Use the factory functions (e.g. int8, float32, etc.) to create instances of built-in data types.

Custom data types can be implemented by registering structs that implement the traits of zarrs_data_type. A custom data type guide can be found in The zarrs book.

DataTypeV3 data_type nameV2 dtypeElementOwned / Element
(Feature Flag)
Boolbool|b1bool
Int2int2i8
Int4int4i8
Int8int8|i1i8
Int16int16>i2 <i2i16
Int32int32>i4 <i4i32
Int64int64>i8 <i8i64
UInt2uint2u8
UInt4uint4u8
UInt8uint8|u1u8
UInt16uint16>u2 <u2u16
UInt32uint32>u4 <u4u32
UInt64uint64>u8 <u8u64
Float4E2M1FNfloat4_e2m1fn
Float6E2M3FNfloat6_e2m3fn
Float6E3M2FNfloat6_e3m2fn
Float8E3M4float8_e3m4
Float8E4M3float8_e4m3float8::F8E4M3 (float8)
Float8E4M3B11FNUZfloat8_e4m3b11fnuz
Float8E4M3FNUZfloat8_e4m3fnuz
Float8E5M2float8_e5m2float8::F8E5M2 (float8)
Float8E5M2FNUZfloat8_e5m2fnuz
Float8E8M0FNUfloat8_e8m0fnu
BFloat16bfloat16half::bf16
Float16float16>f2 <f2half::f16
Float32float32>f4 <f4f32
Float64float64>f8 <f8f64
Complex64complex64>c8 <c8Complex<f32>
Complex128complex128>c16 <c16Complex<f64>
ComplexBFloat16complex_bfloat16Complex<half::bf16>
ComplexFloat16complex_float16Complex<half::f16>
ComplexFloat32complex_float32Complex<f32>
ComplexFloat64complex_float64Complex<f64>
ComplexFloat4E2M1FNcomplex_float4_e2m1fn
ComplexFloat6E2M3FNcomplex_float6_e2m3fn
ComplexFloat6E3M2FNcomplex_float6_e3m2fn
ComplexFloat8E3M4complex_float8_e3m4
ComplexFloat8E4M3complex_float8_e4m3Complex<float8::F8E4M3> (float8)
ComplexFloat8E4M3B11FNUZcomplex_float8_e4m3b11fnuz
ComplexFloat8E4M3FNUZcomplex_float8_e4m3fnuz
ComplexFloat8E5M2complex_float8_e5m2Complex<float8::F8E5M2> (float8)
ComplexFloat8E5M2FNUZcomplex_float8_e5m2fnuz
ComplexFloat8E8M0FNUcomplex_float8_e8m0fnu
Optional🚧zarrs.optionalOption
RawBitsr*|V*[u8; N] / &[u8; N]
Stringstring|OString / &str
Bytesbytes
binary
🚧variable_length_bytes
|VXVec<u8> / &[u8]
NumpyDateTime64numpy.datetime64i64
chrono::DateTime<Utc> (chrono)
jiff::Timestamp (jiff)
NumpyTimeDelta64numpy.timedelta64i64
chrono::TimeDelta (chrono)
jiff::SignedDuration (jiff)

† Additional features (e.g. float8) may be required to parse floating point fill values. All subfloat types support hex string fill values.

Re-exports§

pub use zarrs_data_type as api;

Structs§

BFloat16DataType
The bfloat16 data type.
BoolDataType
The bool data type.
BytesDataType
The bytes data type.
Complex64DataType
The complex64 data type.
Complex128DataType
The complex128 data type.
ComplexBFloat16DataType
The complex_bfloat16 data type.
ComplexFloat4E2M1FNDataType
The complex_float4_e2m1fn data type.
ComplexFloat6E2M3FNDataType
The complex_float6_e2m3fn data type.
ComplexFloat6E3M2FNDataType
The complex_float6_e3m2fn data type.
ComplexFloat8E3M4DataType
The complex_float8_e3m4 data type.
ComplexFloat8E4M3B11FNUZDataType
The complex_float8_e4m3b11fnuz data type.
ComplexFloat8E4M3DataType
The complex_float8_e4m3 data type.
ComplexFloat8E4M3FNUZDataType
The complex_float8_e4m3fnuz data type.
ComplexFloat8E5M2DataType
The complex_float8_e5m2 data type.
ComplexFloat8E5M2FNUZDataType
The complex_float8_e5m2fnuz data type.
ComplexFloat8E8M0FNUDataType
The complex_float8_e8m0fnu data type.
ComplexFloat16DataType
The complex_float16 data type.
ComplexFloat32DataType
The complex_float32 data type.
ComplexFloat64DataType
The complex_float64 data type.
Float4E2M1FNDataType
The float4_e2m1fn data type.
Float6E2M3FNDataType
The float6_e2m3fn data type.
Float6E3M2FNDataType
The float6_e3m2fn data type.
Float8E3M4DataType
The float8_e3m4 data type.
Float8E4M3B11FNUZDataType
The float8_e4m3b11fnuz data type.
Float8E4M3DataType
The float8_e4m3 data type.
Float8E4M3FNUZDataType
The float8_e4m3fnuz data type.
Float8E5M2DataType
The float8_e5m2 data type.
Float8E5M2FNUZDataType
The float8_e5m2fnuz data type.
Float8E8M0FNUDataType
The float8_e8m0fnu data type.
Float16DataType
The float16 data type.
Float32DataType
The float32 data type.
Float64DataType
The float64 data type.
Int2DataType
The int2 data type.
Int4DataType
The int4 data type.
Int8DataType
The int8 data type.
Int16DataType
The int16 data type.
Int32DataType
The int32 data type.
Int64DataType
The int64 data type.
NumpyDateTime64DataType
The numpy.datetime64 data type.
NumpyTimeDelta64DataType
The numpy.timedelta64 data type.
OptionalDataType
The optional data type.
RawBitsDataType
The r* data type.
StringDataType
The string data type.
UInt2DataType
The uint2 data type.
UInt4DataType
The uint4 data type.
UInt8DataType
The uint8 data type.
UInt16DataType
The uint16 data type.
UInt32DataType
The uint32 data type.
UInt64DataType
The uint64 data type.

Enums§

NumpyTimeUnit
A NumPy time unit (for datetime64/timedelta64).

Functions§

bfloat16
Create a bfloat16 data type.
bool
Create a bool data type.
bytes
Create a bytes data type.
complex64
Create a complex64 data type.
complex128
Create a complex128 data type.
complex_bfloat16
Create a complex_bfloat16 data type.
complex_float4_e2m1fn
Create a complex_float4_e2m1fn data type.
complex_float6_e2m3fn
Create a complex_float6_e2m3fn data type.
complex_float6_e3m2fn
Create a complex_float6_e3m2fn data type.
complex_float8_e3m4
Create a complex_float8_e3m4 data type.
complex_float8_e4m3
Create a complex_float8_e4m3 data type.
complex_float8_e4m3b11fnuz
Create a complex_float8_e4m3b11fnuz data type.
complex_float8_e4m3fnuz
Create a complex_float8_e4m3fnuz data type.
complex_float8_e5m2
Create a complex_float8_e5m2 data type.
complex_float8_e5m2fnuz
Create a complex_float8_e5m2fnuz data type.
complex_float8_e8m0fnu
Create a complex_float8_e8m0fnu data type.
complex_float16
Create a complex_float16 data type.
complex_float32
Create a complex_float32 data type.
complex_float64
Create a complex_float64 data type.
float4_e2m1fn
Create a float4_e2m1fn data type.
float6_e2m3fn
Create a float6_e2m3fn data type.
float6_e3m2fn
Create a float6_e3m2fn data type.
float8_e3m4
Create a float8_e3m4 data type.
float8_e4m3
Create a float8_e4m3 data type.
float8_e4m3b11fnuz
Create a float8_e4m3b11fnuz data type.
float8_e4m3fnuz
Create a float8_e4m3fnuz data type.
float8_e5m2
Create a float8_e5m2 data type.
float8_e5m2fnuz
Create a float8_e5m2fnuz data type.
float8_e8m0fnu
Create a float8_e8m0fnu data type.
float16
Create a float16 data type.
float32
Create a float32 data type.
float64
Create a float64 data type.
int2
Create an int2 data type.
int4
Create an int4 data type.
int8
Create an int8 data type.
int16
Create an int16 data type.
int32
Create an int32 data type.
int64
Create an int64 data type.
numpy_datetime64
Create a numpy.datetime64 data type.
numpy_timedelta64
Create a numpy.timedelta64 data type.
optional
Create an optional data type wrapping the given inner type.
raw_bits
Create an r* (raw bits) data type with the given size in bytes.
string
Create a string data type.
uint2
Create a uint2 data type.
uint4
Create a uint4 data type.
uint8
Create a uint8 data type.
uint16
Create a uint16 data type.
uint32
Create a uint32 data type.
uint64
Create a uint64 data type.