Skip to content

is_metric_var

Functions:

Name Description
is_metric_var

Check if the data array is a metric variable.

Functions#

is_metric_var #

is_metric_var(data_array: DataArray) -> bool

Check if the data array is a metric variable. Args: data_array (xr.DataArray): The data array to check. Returns: bool: True if the data array is a metric variable, False otherwise.

Source code in tsdat/transform_v2/utils/is_metric_var.py
def is_metric_var(data_array: xr.DataArray) -> bool:
    """
    Check if the data array is a metric variable.
    Args:
        data_array (xr.DataArray): The data array to check.
    Returns:
        bool: True if the data array is a metric variable, False otherwise.
    """
    return _is_std_dev_var(data_array) or _is_goodfrac_var(data_array)