Source code for graphnet.utilities.maths
"""Collection of assorted "maths-like" functions."""
import torch
[docs]
def eps_like(tensor: torch.Tensor) -> torch.Tensor:
    """Return `eps` matching `tensor`'s dtype."""
    return torch.finfo(tensor.dtype).eps