def _process_data_var(string):
    """Transform datastring to key, values pair.

    All values are transformed to floating point values.

    Parameters
    ----------
    string : str

    Returns
    -------
    Tuple[Str, Str]
        key, values pair
    """
    key, var = string.split("<-")
    if "structure" in var:
        var, dim = var.replace("structure(", "").replace(",", "").split(".Dim")
        # dtype = int if '.' not in var and 'e' not in var.lower() else float
        dtype = float
        var = var.replace("c(", "").replace(")", "").strip().split()
        dim = dim.replace("=", "").replace("c(", "").replace(")", "").strip().split()
        dim = tuple(map(int, dim))
        var = np.fromiter(map(dtype, var), dtype).reshape(dim, order="F")
    elif "c(" in var:
        # dtype = int if '.' not in var and 'e' not in var.lower() else float
        dtype = float
        var = var.replace("c(", "").replace(")", "").split(",")
        var = np.fromiter(map(dtype, var), dtype)
    else:
        # dtype = int if '.' not in var and 'e' not in var.lower() else float
        dtype = float
        var = dtype(var)
    return key.strip(), var
def _process_data_var ( string ) : key , var = string . split ( "<-" ) if "structure" in var : var , dim = var . replace ( "structure(" , "" ) . replace ( "," , "" ) . split ( ".Dim" ) dtype = float var = var . replace ( "c(" , "" ) . replace ( ")" , "" ) . strip ( ) . split ( ) dim = dim . replace ( "=" , "" ) . replace ( "c(" , "" ) . replace ( ")" , "" ) . strip ( ) . split ( ) dim = tuple ( map ( int , dim ) ) var = np . fromiter ( map ( dtype , var ) , dtype ) . reshape ( dim , order = "F" ) elif "c(" in var : dtype = float var = var . replace ( "c(" , "" ) . replace ( ")" , "" ) . split ( "," ) var = np . fromiter ( map ( dtype , var ) , dtype ) else : dtype = float var = dtype ( var ) return key . strip ( ) , var
Transform datastring to key, values pair.

    All values are transformed to floating point values.

    Parameters
    ----------
    string : str

    Returns
    -------
    Tuple[Str, Str]
        key, values pair