Encodes a vector as little-endian float32 bytes. Values are rounded to single precision, which is the precision embedding models produce; NaN and infinities are stored as-is.
NaN
The vector, e.g. a number[] or a Float32Array.
number[]
Float32Array
A new byte array of values.length × 4 bytes.
values.length × 4
Encodes a vector as little-endian float32 bytes. Values are rounded to single precision, which is the precision embedding models produce;
NaNand infinities are stored as-is.