def partial_velocities(system, generalized_speeds, frame,
                       kde_map=None, constraint_map=None, express_frame=None):
    partials = PartialVelocity(frame, generalized_speeds)
    if express_frame is None:
        express_frame = frame

    for p in system:
        if partials in p:
            continue
        if isinstance(p, Point):
            v = p.vel(frame)
        elif isinstance(p, ReferenceFrame):
            v = p.ang_vel_in(frame)
        if kde_map is not None:
            v = subs(v, kde_map)
        if constraint_map is not None:
            v = subs(v, constraint_map)

        v_r_p = {}
        for u in generalized_speeds:
            v_r_p[u] = Vector([]) if v == 0 else v.diff(u, express_frame)
        partials[p] = v_r_p
    return partials
dataset/ETHPy150Open pydy/pydy/examples/Kane1985/Chapter4/util.py/partial_velocities/swapped operands of `in`