diff --git a/src/pyhf/tensor/jax_backend.py b/src/pyhf/tensor/jax_backend.py index c1e81dae47..33423e3b6a 100644 --- a/src/pyhf/tensor/jax_backend.py +++ b/src/pyhf/tensor/jax_backend.py @@ -648,10 +648,10 @@ def diagonal(self, tensor_in): >>> pyhf.set_backend("jax") >>> tensor = pyhf.tensorlib.astensor([[1.0, 0.0], [0.0, 1.0]]) >>> tensor - tensor([[1., 0.], - [0., 1.]]) + Array([[1., 0.], + [0., 1.]], dtype=float64) >>> pyhf.tensorlib.diagonal(tensor) - tensor([1., 1.]) + Array([1., 1.], dtype=float64) Args: tensor_in (:obj:`tensor`): The input tensor object. diff --git a/src/pyhf/tensor/numpy_backend.py b/src/pyhf/tensor/numpy_backend.py index 63f3c9d961..1a0dcf8ef1 100644 --- a/src/pyhf/tensor/numpy_backend.py +++ b/src/pyhf/tensor/numpy_backend.py @@ -668,10 +668,10 @@ def diagonal(self, tensor_in: Tensor[T]) -> ArrayLike: >>> pyhf.set_backend("numpy") >>> tensor = pyhf.tensorlib.astensor([[1.0, 0.0], [0.0, 1.0]]) >>> tensor - tensor([[1., 0.], - [0., 1.]]) + array([[1., 0.], + [0., 1.]]) >>> pyhf.tensorlib.diagonal(tensor) - tensor([1., 1.]) + array([1., 1.]) Args: tensor_in (:obj:`tensor`): The input tensor object. diff --git a/src/pyhf/tensor/tensorflow_backend.py b/src/pyhf/tensor/tensorflow_backend.py index 2580660f14..8dba831170 100644 --- a/src/pyhf/tensor/tensorflow_backend.py +++ b/src/pyhf/tensor/tensorflow_backend.py @@ -752,10 +752,11 @@ def diagonal(self, tensor_in): >>> pyhf.set_backend("tensorflow") >>> tensor = pyhf.tensorlib.astensor([[1.0, 0.0], [0.0, 1.0]]) >>> tensor - tensor([[1., 0.], - [0., 1.]]) + >>> pyhf.tensorlib.diagonal(tensor) - tensor([1., 1.]) +