import torch


def get_batch_r(node_arr, device="cpu"):
    """Returns batch of one user's ratings

    node_arr (2D float array): one line is [userID, vID1, vID2, rating]
    device (str): device used (cpu/gpu)

    Returns:
        (float tensor): batch of ratings
    """
    return torch.FloatTensor(node_arr[:, 3], device=device)