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.
DataType | V3 data_type name | V2 dtype | ElementOwned / Element(Feature Flag) |
|---|---|---|---|
Bool | bool | |b1 | bool |
Int2 | int2 | i8 | |
Int4 | int4 | i8 | |
Int8 | int8 | |i1 | i8 |
Int16 | int16 | >i2 <i2 | i16 |
Int32 | int32 | >i4 <i4 | i32 |
Int64 | int64 | >i8 <i8 | i64 |
UInt2 | uint2 | u8 | |
UInt4 | uint4 | u8 | |
UInt8 | uint8 | |u1 | u8 |
UInt16 | uint16 | >u2 <u2 | u16 |
UInt32 | uint32 | >u4 <u4 | u32 |
UInt64 | uint64 | >u8 <u8 | u64 |
Float4E2M1FN† | float4_e2m1fn | ||
Float6E2M3FN† | float6_e2m3fn | ||
Float6E3M2FN† | float6_e3m2fn | ||
Float8E3M4† | float8_e3m4 | ||
Float8E4M3† | float8_e4m3 | float8::F8E4M3 (float8) | |
Float8E4M3B11FNUZ† | float8_e4m3b11fnuz | ||
Float8E4M3FNUZ† | float8_e4m3fnuz | ||
Float8E5M2† | float8_e5m2 | float8::F8E5M2 (float8) | |
Float8E5M2FNUZ† | float8_e5m2fnuz | ||
Float8E8M0FNU† | float8_e8m0fnu | ||
BFloat16 | bfloat16 | half::bf16 | |
Float16 | float16 | >f2 <f2 | half::f16 |
Float32 | float32 | >f4 <f4 | f32 |
Float64 | float64 | >f8 <f8 | f64 |
Complex64 | complex64 | >c8 <c8 | Complex<f32> |
Complex128 | complex128 | >c16 <c16 | Complex<f64> |
ComplexBFloat16 | complex_bfloat16 | Complex<half::bf16> | |
ComplexFloat16 | complex_float16 | Complex<half::f16> | |
ComplexFloat32 | complex_float32 | Complex<f32> | |
ComplexFloat64 | complex_float64 | Complex<f64> | |
ComplexFloat4E2M1FN† | complex_float4_e2m1fn | ||
ComplexFloat6E2M3FN† | complex_float6_e2m3fn | ||
ComplexFloat6E3M2FN† | complex_float6_e3m2fn | ||
ComplexFloat8E3M4† | complex_float8_e3m4 | ||
ComplexFloat8E4M3† | complex_float8_e4m3 | Complex<float8::F8E4M3> (float8) | |
ComplexFloat8E4M3B11FNUZ† | complex_float8_e4m3b11fnuz | ||
ComplexFloat8E4M3FNUZ† | complex_float8_e4m3fnuz | ||
ComplexFloat8E5M2† | complex_float8_e5m2 | Complex<float8::F8E5M2> (float8) | |
ComplexFloat8E5M2FNUZ† | complex_float8_e5m2fnuz | ||
ComplexFloat8E8M0FNU† | complex_float8_e8m0fnu | ||
Optional | 🚧zarrs.optional | Option | |
RawBits | r* | |V* | [u8; N] / &[u8; N] |
String | string | |O | String / &str |
Bytes | bytesbinary🚧 variable_length_bytes | |VX | Vec<u8> / &[u8] |
NumpyDateTime64 | numpy.datetime64 | i64chrono::DateTime<Utc> (chrono)jiff::Timestamp (jiff) | |
NumpyTimeDelta64 | numpy.timedelta64 | i64chrono::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§
- BFloat16
Data Type - The
bfloat16data type. - Bool
Data Type - The
booldata type. - Bytes
Data Type - The
bytesdata type. - Complex64
Data Type - The
complex64data type. - Complex128
Data Type - The
complex128data type. - ComplexB
Float16 Data Type - The
complex_bfloat16data type. - Complex
Float4 E2M1FN Data Type - The
complex_float4_e2m1fndata type. - Complex
Float6 E2M3FN Data Type - The
complex_float6_e2m3fndata type. - Complex
Float6 E3M2FN Data Type - The
complex_float6_e3m2fndata type. - Complex
Float8 E3M4 Data Type - The
complex_float8_e3m4data type. - Complex
Float8 E4M3 B11FNUZ Data Type - The
complex_float8_e4m3b11fnuzdata type. - Complex
Float8 E4M3 Data Type - The
complex_float8_e4m3data type. - Complex
Float8 E4M3FNUZ Data Type - The
complex_float8_e4m3fnuzdata type. - Complex
Float8 E5M2 Data Type - The
complex_float8_e5m2data type. - Complex
Float8 E5M2FNUZ Data Type - The
complex_float8_e5m2fnuzdata type. - Complex
Float8 E8M0FNU Data Type - The
complex_float8_e8m0fnudata type. - Complex
Float16 Data Type - The
complex_float16data type. - Complex
Float32 Data Type - The
complex_float32data type. - Complex
Float64 Data Type - The
complex_float64data type. - Float4
E2M1FN Data Type - The
float4_e2m1fndata type. - Float6
E2M3FN Data Type - The
float6_e2m3fndata type. - Float6
E3M2FN Data Type - The
float6_e3m2fndata type. - Float8
E3M4 Data Type - The
float8_e3m4data type. - Float8
E4M3 B11FNUZ Data Type - The
float8_e4m3b11fnuzdata type. - Float8
E4M3 Data Type - The
float8_e4m3data type. - Float8
E4M3FNUZ Data Type - The
float8_e4m3fnuzdata type. - Float8
E5M2 Data Type - The
float8_e5m2data type. - Float8
E5M2FNUZ Data Type - The
float8_e5m2fnuzdata type. - Float8
E8M0FNU Data Type - The
float8_e8m0fnudata type. - Float16
Data Type - The
float16data type. - Float32
Data Type - The
float32data type. - Float64
Data Type - The
float64data type. - Int2
Data Type - The
int2data type. - Int4
Data Type - The
int4data type. - Int8
Data Type - The
int8data type. - Int16
Data Type - The
int16data type. - Int32
Data Type - The
int32data type. - Int64
Data Type - The
int64data type. - Numpy
Date Time64 Data Type - The
numpy.datetime64data type. - Numpy
Time Delta64 Data Type - The
numpy.timedelta64data type. - Optional
Data Type - The
optionaldata type. - RawBits
Data Type - The
r*data type. - String
Data Type - The
stringdata type. - UInt2
Data Type - The
uint2data type. - UInt4
Data Type - The
uint4data type. - UInt8
Data Type - The
uint8data type. - UInt16
Data Type - The
uint16data type. - UInt32
Data Type - The
uint32data type. - UInt64
Data Type - The
uint64data type.
Enums§
- Numpy
Time Unit - A
NumPytime unit (fordatetime64/timedelta64).
Functions§
- bfloat16
- Create a
bfloat16data type. - bool
- Create a
booldata type. - bytes
- Create a
bytesdata type. - complex64
- Create a
complex64data type. - complex128
- Create a
complex128data type. - complex_
bfloat16 - Create a
complex_bfloat16data type. - complex_
float4_ e2m1fn - Create a
complex_float4_e2m1fndata type. - complex_
float6_ e2m3fn - Create a
complex_float6_e2m3fndata type. - complex_
float6_ e3m2fn - Create a
complex_float6_e3m2fndata type. - complex_
float8_ e3m4 - Create a
complex_float8_e3m4data type. - complex_
float8_ e4m3 - Create a
complex_float8_e4m3data type. - complex_
float8_ e4m3b11fnuz - Create a
complex_float8_e4m3b11fnuzdata type. - complex_
float8_ e4m3fnuz - Create a
complex_float8_e4m3fnuzdata type. - complex_
float8_ e5m2 - Create a
complex_float8_e5m2data type. - complex_
float8_ e5m2fnuz - Create a
complex_float8_e5m2fnuzdata type. - complex_
float8_ e8m0fnu - Create a
complex_float8_e8m0fnudata type. - complex_
float16 - Create a
complex_float16data type. - complex_
float32 - Create a
complex_float32data type. - complex_
float64 - Create a
complex_float64data type. - float4_
e2m1fn - Create a
float4_e2m1fndata type. - float6_
e2m3fn - Create a
float6_e2m3fndata type. - float6_
e3m2fn - Create a
float6_e3m2fndata type. - float8_
e3m4 - Create a
float8_e3m4data type. - float8_
e4m3 - Create a
float8_e4m3data type. - float8_
e4m3b11fnuz - Create a
float8_e4m3b11fnuzdata type. - float8_
e4m3fnuz - Create a
float8_e4m3fnuzdata type. - float8_
e5m2 - Create a
float8_e5m2data type. - float8_
e5m2fnuz - Create a
float8_e5m2fnuzdata type. - float8_
e8m0fnu - Create a
float8_e8m0fnudata type. - float16
- Create a
float16data type. - float32
- Create a
float32data type. - float64
- Create a
float64data type. - int2
- Create an
int2data type. - int4
- Create an
int4data type. - int8
- Create an
int8data type. - int16
- Create an
int16data type. - int32
- Create an
int32data type. - int64
- Create an
int64data type. - numpy_
datetime64 - Create a
numpy.datetime64data type. - numpy_
timedelta64 - Create a
numpy.timedelta64data 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
stringdata type. - uint2
- Create a
uint2data type. - uint4
- Create a
uint4data type. - uint8
- Create a
uint8data type. - uint16
- Create a
uint16data type. - uint32
- Create a
uint32data type. - uint64
- Create a
uint64data type.