dca.typing.ArrayAliasMeta#
- class dataclass_array.typing.ArrayAliasMeta(shape: str | int | ellipsis | None | Tuple[str | int | ellipsis | None, ...], dtype: numpy.dtype | Type[numpy.generic] | etils.enp.array_types.dtypes.DType | None)[source]#
Bases:
typeMetaclass to create array aliases.
This allow to annotate the array shape/dtype with named axis. The dtype is defined by the class name (
f32for float32,ui8for uint8,Arrayfor any type). The shape is defined either as tuple of str, int or …. (e.g f32[‘b h w c’], f32[32, 256, 256, 3], f32[…, ‘h w’, 3]).All tuple values are concatenated, so f32[…, ‘h’, ‘w’, ‘c’] is the same as f32[’… h w c’].
- shape: str#
- dtype: etils.enp.array_types.dtypes.DType#