Individual report functions

marine_qc.qc_individual_reports.value_check(value, valid_flag=0, invalid_flag=1)[source]

Check if a value is equal to None or numerically invalid (NaN).

Parameters:
  • value (ValueNumberType) – The input value(s) to be tested. Can be a scalar, sequence (e.g., list or tuple), a one-dimensional NumPy array, or a pandas Series.

  • valid_flag (int, default: 0) – Integer value how to flag valid values.

  • invalid_flag (int, default: 1) – Integer value how to flag invalid values.

Return type:

ValueIntType

Returns:

ValueIntType – Same type as input, but with integer values

  • Returns 1 (or array/sequence/Series of 1s) if the input value is None or numerically invalid (NaN)

  • Returns 0 (or array/sequence/Series of 0s) otherwise.

Raises:

TypeError – If inspect_arrays does not return np.ndarrays.