def flatten(vec):
    """
    Converts a sympy N X 1 matrix to a list.

    Parameters
    ----------
    vec: symbpy.Matrix N X 1

    Returns
    -------
    list
    """
    return [ [v for v in z] for z in vec][0]