Function numcodecs_bit_round::bit_round
source · pub fn bit_round<T: Float, S: Data<Elem = T>, D: Dimension>(
data: ArrayBase<S, D>,
keepbits: u8,
) -> Result<Array<T, D>, BitRoundCodecError>
Expand description
Floating-point bit rounding, which drops the specified number of bits from the floating point mantissa.
See https://github.com/milankl/BitInformation.jl for the the original implementation in Julia.
§Errors
Errors with BitRoundCodecError::ExcessiveKeepBits
if keepbits
exceeds
T::MANITSSA_BITS
.