caput.util.truncate#

Routines for truncating data to a specified precision.

Provides absolute and relative bit truncation routines for integers, floating point numbers, and numpy arrays.

Functions#

bit_truncate_double(→ numpy.float64)

Truncate using a fixed error.

bit_truncate_float(→ numpy.float32)

Truncate using a fixed error.

bit_truncate_max_complex(→ numpy.ndarray[numpy.complex128])

Truncate using a relative per-element and per the maximum of the last dimension.

bit_truncate_relative(…)

Truncate using a relative tolerance.

bit_truncate_weights(…)

Truncate using a set of inverse variance weights.