Missing values#

The canonical missing-value test and the recommended fill values, as defined by the convention and explained in the missing values chapter.

h5col.recommended_fill(dtype: Any) Any[source]#

Return H5Col’s recommended fill value for dtype.

  • Fixed- or variable-length string dtypes → b"".

  • Enumerations with a MISSING member → the integer code of that member (the spec’s enum fill convention).

  • Enumerations without a MISSING member, including the H5Col boolean datatype (which MUST NOT declare a fill value at all) → raises.

  • Integer and float families → the table sentinel.

  • Anything else (e.g. float16) → raises FillValueError.

h5col.is_missing(values: Any, fill_value: Any) NDArray[bool][source]#

Apply the canonical missing-value test element-wise.

missing(v, f) = isnan(f) ? isnan(v) : v == f — i.e. when the fill value is a NaN bit pattern the test is isnan(v); otherwise it is bit/value equality.

h5col.validate_fill_outside_range(fill: Any, valid_min: Any | None = None, valid_max: Any | None = None) None[source]#

Check that fill lies strictly outside [valid_min, valid_max].

A None bound is treated as unbounded on that side. Raises FillValueError if fill falls inside the declared range.