1# mypy: ignore-errors 2 3import torch 4 5from . import _dtypes 6 7 8def finfo(dtyp): 9 torch_dtype = _dtypes.dtype(dtyp).torch_dtype 10 return torch.finfo(torch_dtype) 11 12 13def iinfo(dtyp): 14 torch_dtype = _dtypes.dtype(dtyp).torch_dtype 15 return torch.iinfo(torch_dtype) 16