blob: 4f28306afff4a8306b1e76eb9694e9da9caf6d0d [file] [log] [blame]
import contextlib
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)
@contextlib.contextmanager
def errstate(*args, **kwds):
yield