qcodes/dataset/data_export.py
def _rows_from_datapoints(inputsetpoints: np.ndarray) -> np.ndarray:
    """
    Cast the (potentially) unordered setpoints into rows
    of sorted, unique setpoint values. Because of the way they are ordered,
    these rows do not necessarily correspond to actual rows of the scan,
    but they can nonetheless be used to identify certain scan types

    Args:
        setpoints: The raw setpoints as a one-dimensional array

    Returns:
        A ndarray of the rows
    """

    rows = []
    setpoints = inputsetpoints.copy()

    # first check if there is only one unique array in which case we can avoid the
    # potentially slow loop below
    temp, inds, count = np.unique(setpoints, return_index=True,
                                  return_counts=True)
    num_repeats_array = np.unique(count)
    if len(num_repeats_array) == 1 and count.sum() == len(inputsetpoints):
        return np.tile(temp, (num_repeats_array[0], 1))
    else:
        rows.append(temp)
        setpoints = np.delete(setpoints, inds)

    while len(setpoints) > 0:
        temp, inds = np.unique(setpoints, return_index=True)
        rows.append(temp)
        setpoints = np.delete(setpoints, inds)

    return list_of_data_to_maybe_ragged_nd_array(rows)

    Cast the (potentially) unordered setpoints into rows
    of sorted, unique setpoint values. Because of the way they are ordered,
    these rows do not necessarily correspond to actual rows of the scan,
    but they can nonetheless be used to identify certain scan types

    Args:
        setpoints: The raw setpoints as a one-dimensional array

    Returns:
        A ndarray of the rows
    
Cast the (potentially) unordered setpoints into rows
of sorted, unique setpoint values. Because of the way they are ordered,
these rows do not necessarily correspond to actual rows of the scan,
but they can nonetheless be used to identify certain scan types
Cast the ( potentially ) unordered setpoints into rows of sorted unique setpoint values . Because of the way they are ordered these rows do not necessarily correspond to actual rows of the scan but they can nonetheless be used to identify certain scan types
def _rows_from_datapoints(inputsetpoints: np.ndarray) -> np.ndarray:
    rows = []
    setpoints = inputsetpoints.copy()
    temp, inds, count = np.unique(setpoints, return_index=True,
                                  return_counts=True)
    num_repeats_array = np.unique(count)
    if len(num_repeats_array) == 1 and count.sum() == len(inputsetpoints):
        return np.tile(temp, (num_repeats_array[0], 1))
    else:
        rows.append(temp)
        setpoints = np.delete(setpoints, inds)
    while len(setpoints) > 0:
        temp, inds = np.unique(setpoints, return_index=True)
        rows.append(temp)
        setpoints = np.delete(setpoints, inds)
    return list_of_data_to_maybe_ragged_nd_array(rows)
def _rows_from_datapoints ( inputsetpoints : np . ndarray ) -> np . ndarray : rows = [ ] setpoints = inputsetpoints . copy ( ) temp , inds , count = np . unique ( setpoints , return_index = True , return_counts = True ) num_repeats_array = np . unique ( count ) if len ( num_repeats_array ) == 1 and count . sum ( ) == len ( inputsetpoints ) : return np . tile ( temp , ( num_repeats_array [ 0 ] , 1 ) ) else : rows . append ( temp ) setpoints = np . delete ( setpoints , inds ) while len ( setpoints ) > 0 : temp , inds = np . unique ( setpoints , return_index = True ) rows . append ( temp ) setpoints = np . delete ( setpoints , inds ) return list_of_data_to_maybe_ragged_nd_array ( rows )
Cast the (potentially) unordered setpoints into rows
of sorted, unique setpoint values.
Cast the ( potentially ) unordered setpoints into rows of sorted unique setpoint values .
"""
    Cast the (potentially) unordered setpoints into rows
    of sorted, unique setpoint values. Because of the way they are ordered,
    these rows do not necessarily correspond to actual rows of the scan,
    but they can nonetheless be used to identify certain scan types

    Args:
        setpoints: The raw setpoints as a one-dimensional array

    Returns:
        A ndarray of the rows
    """ # first check if there is only one unique array in which case we can avoid the # potentially slow loop below
A ndarray of the rows
A ndarray of the rows
inputsetpoints
np.ndarray
setpoints
The raw setpoints as a one-dimensional array
The raw setpoints as a one - dimensional array