rubem.configuration.model_configuration_file.finite_float32

finite_float32(value, label)[source]

Parse value as a finite number a Float32 GDAL band can store.

The Float32 conversion itself decides overflow (a value outside numpy.finfo(numpy.float32)’s range becomes infinite) and underflow (a tiny non-zero value rounds to 0.0, which would collide with a legitimate zero cell in the band); 0 itself stays accepted, as an explicit choice.

Raises:

ValueError – If value is a bool, not numeric, non-finite, overflows to infinity, or (unless it is exactly zero) underflows to zero when converted to Float32.

Return type:

float