Source code for analogvnn.utils.common_types

from typing import Callable, Union, Sequence

from torch import Tensor


[docs]TENSORS = Union[None, Tensor, Sequence[Tensor]]
"""`TENSORS` is a type alias for a tensor or a sequence of tensors. """
[docs]TENSOR_OPERABLE = Union[TENSORS, int, float, bool]
"""`TENSOR_OPERABLE` is a type alias for types that can be operated on by a tensor. """
"""`TENSOR_CALLABLE` is a type alias for a function that takes a `TENSOR_OPERABLE` and returns a `TENSOR_OPERABLE`. """