fn map_float_segment( segment: &Samples, map: &impl Fn(&Float64Array) -> Float64Array, ) -> Result<Samples>