alphapepttools.pp.detect_special_values#
- alphapepttools.pp.detect_special_values(data, verbosity=0)#
Detect special values such as NaN, zero, negative, and infinite values in the data.
This function checks for nonstandard values in the input data and returns a boolean mask indicating their position. Additionally, it provides a log summary for the number and kind of nonstandard values found. This function is useful for upfront checks of data integrity, e.g. prior to transformations or analyses like PCA or clustering.
Current nonstandard values include: - NaN values - Zero values - Negative values - Positive infinity - Negative infinity
If
warnis True, log warnings for found nonstandard values.- Parameters:
data (np.ndarray) – Input data to check for nonstandard values.
verbosity (int, default 0) – If 1, log warnings for nonstandard values found in the data.
- Return type:
- Returns:
np.ndarray A boolean mask indicating the positions of nonstandard values in the data. True indicates a nonstandard value.