qcodes/dataset/data_export.py
def _strings_as_ints(inputarray: np.ndarray) -> np.ndarray:
    """
    Return an integer-valued array version of a string-valued array. Maps, e.g.
    array(['a', 'b', 'c', 'a', 'c']) to array([0, 1, 2, 0, 2]). Useful for
    numerical setpoint analysis

    Args:
        inputarray: A 1D array of strings
    """
    newdata = np.zeros(len(inputarray))
    for n, word in enumerate(np.unique(inputarray)):
        newdata += ((inputarray == word).astype(int)*n)
    return newdata

    Return an integer-valued array version of a string-valued array. Maps, e.g.
    array(['a', 'b', 'c', 'a', 'c']) to array([0, 1, 2, 0, 2]). Useful for
    numerical setpoint analysis

    Args:
        inputarray: A 1D array of strings
    
Return an integer-valued array version of a string-valued array.
Return an integer - valued array version of a string - valued array .
def _strings_as_ints(inputarray: np.ndarray) -> np.ndarray:
    newdata = np.zeros(len(inputarray))
    for n, word in enumerate(np.unique(inputarray)):
        newdata += ((inputarray == word).astype(int)*n)
    return newdata
def _strings_as_ints ( inputarray : np . ndarray ) -> np . ndarray : newdata = np . zeros ( len ( inputarray ) ) for n , word in enumerate ( np . unique ( inputarray ) ) : newdata += ( ( inputarray == word ) . astype ( int ) * n ) return newdata
Return an integer-valued array version of a string-valued array.
Return an integer - valued array version of a string - valued array .
"""
    Return an integer-valued array version of a string-valued array. Maps, e.g.
    array(['a', 'b', 'c', 'a', 'c']) to array([0, 1, 2, 0, 2]). Useful for
    numerical setpoint analysis

    Args:
        inputarray: A 1D array of strings
    """
inputarray
np.ndarray
A 1D array of strings
A 1D array of strings