import torch


def get_column(data: torch.Tensor, i):
    """get a column from a tensor.
    
    Args:
        data (torch.Tensor): a matrix
        i (int): the index of column
    Return:
        column (torch.Tensor): a vector with a shape (:, 1).
    """
    d = data.size(dim=-1)
    x = data.view(-1, d)
    return x[:, i].view(-1, 1)