You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
269 B

# mypy: ignore-errors
import torch
from . import _dtypes
def finfo(dtyp):
torch_dtype = _dtypes.dtype(dtyp).torch_dtype
return torch.finfo(torch_dtype)
def iinfo(dtyp):
torch_dtype = _dtypes.dtype(dtyp).torch_dtype
return torch.iinfo(torch_dtype)