mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 06:40:24 +01:00
tests: associative property test added for complex Corr matmul.
This commit is contained in:
parent
4df00d9bd7
commit
bbbacc7bb4
1 changed files with 6 additions and 0 deletions
|
@ -628,6 +628,12 @@ def test_matmul_overloading():
|
|||
for i in range(4):
|
||||
assert np.all(tt[i] == 0)
|
||||
|
||||
# associative property
|
||||
tt = (corr.real @ pe.dirac.gammaX + corr.imag @ (pe.dirac.gammaX * 1j)) - corr @ pe.dirac.gammaX
|
||||
for el in tt:
|
||||
if el is not None:
|
||||
assert np.all(el == 0)
|
||||
|
||||
corr2 = corr @ corr
|
||||
for i in range(4):
|
||||
np.all(corr2[i] == corr[i] @ corr[i])
|
||||
|
|
Loading…
Add table
Reference in a new issue