Skip to main content

encode_cf

Function encode_cf 

Source
pub fn encode_cf(
    a: &NdArrowArray,
    encoding: &CfEncoding,
) -> Result<NdArrowArray>
Expand description

Pack decoded values back with encoding, the inverse of decode_cf.

Computes (value - offset) / scale, rounds half to even for integer packed types, casts to the packed type, fills nulls with _FillValue (or the first missing_value), and restores the CF attributes.