Skip to content

Tensor and Metadata

Raul Montoya Cardenas edited this page Jul 29, 2026 · 2 revisions

Tensor and Metadata

src/types.rs

DType / TensorData

DType Payload
F32 Vec<f32>
F64 Vec<f64>
I64 Vec<i64>
Bool Vec<bool>

Tensor

Dense row-major (C-order) shape + typed data. Shape/data private to preserve product(shape) == len(data).

Constructors: from_f32, from_f64, from_i64, etc. (return Result on length mismatch).

On HDF5 read, narrower integer types widen to i64; float widths preserved.

Metadata

MetadataMap / MetadataValue — free-form key/value (strings, numbers, lists, tensors). Keys must be legal HDF5 link names when writing.


Last updated: July 29, 2026 Updated by: Grok Build: Grok 4.5 Package tip reference: df72fc9 (main)

Clone this wiki locally