import torch


def to_torch_tensor(np_array):
    """
    convert a numpy array to a torch tensor by putting it to the appropriate type
    and dimension
    """
    return torch.tensor(np_array).unsqueeze(0).to(torch.float32)