import numpy as np
import tifffile
import torch
from torch import Tensor


def read_tiff(filepath: str) -> Tensor:
    y = tifffile.imread(filepath)
    y = y.astype(np.float32)
    y = torch.from_numpy(y)
    return y
