mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
test: test for jack_matmul with multiple operands added
This commit is contained in:
parent
ebbfaf8e80
commit
cf1c38462d
1 changed files with 11 additions and 0 deletions
|
@ -92,6 +92,17 @@ def test_multi_dot():
|
||||||
assert e.is_zero(), t
|
assert e.is_zero(), t
|
||||||
|
|
||||||
|
|
||||||
|
def test_jack_multi_dot():
|
||||||
|
for dim in [2, 4, 8]:
|
||||||
|
my_array = get_real_matrix(dim)
|
||||||
|
|
||||||
|
tt = pe.linalg.jack_matmul(my_array, my_array, my_array) - pe.linalg.matmul(my_array, my_array, my_array)
|
||||||
|
|
||||||
|
for t, e in np.ndenumerate(tt):
|
||||||
|
assert e.is_zero(atol=1e-1), t
|
||||||
|
assert np.isclose(e.value, 0.0)
|
||||||
|
|
||||||
|
|
||||||
def test_matmul_irregular_histories():
|
def test_matmul_irregular_histories():
|
||||||
dim = 2
|
dim = 2
|
||||||
length = 500
|
length = 500
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue