analyses/utils.py
def stack_controls(controls: list[dict], key: str = "tau"):
    """
    Stack the controls in one vector

    Parameters
    ----------
    controls : list[dict]
        List of dictionaries containing the controls
    key : str
        Key of the controls to stack such as "tau" or "qddot"
    """
    return np.hstack((controls[0][key][:, :-1], controls[1][key][:, :]))

    Stack the controls in one vector

    Parameters
    ----------
    controls : list[dict]
        List of dictionaries containing the controls
    key : str
        Key of the controls to stack such as "tau" or "qddot"
    
Stack the controls in one vector
Parameters

controls : list[dict]
List of dictionaries containing the controls
key : str
Key of the controls to stack such as "tau" or "qddot"
Stack the controls in one vector Parameters controls : list [ dict ] List of dictionaries containing the controls key : str Key of the controls to stack such as " tau " or " qddot "
def stack_controls(controls: list[dict], key: str = "tau"):
    return np.hstack((controls[0][key][:, :-1], controls[1][key][:, :]))
def stack_controls ( controls : list [ dict ] , key : str = "tau" ) : return np . hstack ( ( controls [ 0 ] [ key ] [ : , : - 1 ] , controls [ 1 ] [ key ] [ : , : ] ) )
Stack the controls in one vector
Parameters
Stack the controls in one vector Parameters
"""
    Stack the controls in one vector

    Parameters
    ----------
    controls : list[dict]
        List of dictionaries containing the controls
    key : str
        Key of the controls to stack such as "tau" or "qddot"
    """
controls
list[dict]
key
str