def casadi2List(x):
    """
    Converts casadi vector to list.

    Parameters
    ----------
    x : casadi.SX.sym
        Input casadi symbolic vector.

    Returns
    -------
    list
        List that contains element of vector x.
    """
    n = x.shape[0]
    z = []
    for k in range(n):
        z.append(float(x[k]))
    return z