summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_einsum.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/tests/test_einsum.py b/numpy/core/tests/test_einsum.py
index 9d6b39407..1b5b4cb26 100644
--- a/numpy/core/tests/test_einsum.py
+++ b/numpy/core/tests/test_einsum.py
@@ -5,7 +5,7 @@ import itertools
import numpy as np
from numpy.testing import (
assert_, assert_equal, assert_array_equal, assert_almost_equal,
- assert_raises, suppress_warnings, assert_raises_regex
+ assert_raises, suppress_warnings, assert_raises_regex, assert_allclose
)
# Setup for optimize einsum
@@ -704,7 +704,9 @@ class TestEinsum(object):
# Issues gh-14692 and gh-12689
# Bug with signed vs unsigned char errored on power9 and s390x Linux
tensor = np.random.random_sample((10, 10, 10, 10))
- print(np.einsum('ijij->', tensor))
+ x = np.einsum('ijij->', tensor)
+ y = tensor.trace(axis1=0, axis2=2).trace()
+ assert_allclose(x, y)
def test_einsum_all_contig_non_contig_output(self):
# Issue gh-5907, tests that the all contiguous special case