diff --git a/src/pyhf/tensor/numpy_backend.py b/src/pyhf/tensor/numpy_backend.py index 4529c5a7e6..3b7dec18a9 100644 --- a/src/pyhf/tensor/numpy_backend.py +++ b/src/pyhf/tensor/numpy_backend.py @@ -7,7 +7,7 @@ from pyhf.typing import TensorBackend, Shape -from typing import TypeVar, Callable, Literal, Sequence, Generic, Mapping +from typing import TypeVar, Callable, Literal, Sequence, Generic, Mapping, Union from numpy.typing import ( NDArray, NBitBase, @@ -16,7 +16,7 @@ ) T = TypeVar("T", bound=NBitBase) -Tensor = NDArray[np.number[T]] | NDArray[np.bool_] +Tensor = Union[NDArray[np.number[T]], NDArray[np.bool_]] log = logging.getLogger(__name__)