def dR_da_i(dR_dq, bases_i):
    """
    See :meth:`compute_dR_dq`

    :param dR_dq: Derivative of the cost funtions w.r.t. the quaternion q
    :param basis_i: B-spline basis of index i
    """
    dR_da_i = dR_dq * bases_i
    return dR_da_i.reshape(4, 1)