def to_numpy_array(torch_tensor):
    """
    convert a torch tensor to a numpy array by putting it to the appropriate type
    and dimension
    """
    return torch_tensor.squeeze().detach().numpy()