Skip to main content

encode

Function encode 

Source
pub fn encode(
    data: &[f32],
    dims: usize,
    vectors: usize,
) -> Result<Vec<u8>, CodecError>
Expand description

Encode f32 embeddings using spherical coordinate transformation + lz4.

Input: flat array of f32 values, vectors * dims total elements. Each consecutive dims values form one embedding vector.