Skip to main content

decode_cf

Function decode_cf 

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

Mask fill and out-of-range values as nulls, then unpack scale and offset.

  • _FillValue and every missing_value become null.
  • Values outside valid_min, valid_max or valid_range become null.
  • With scale_factor or add_offset, the result is value * scale + offset in the type of those attributes (a float type), else in Float64.

The CF keys move from the attributes to the returned CfEncoding.