mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
feat: added support for addition and multiplication of complex numbers (#209)
to Corr objects.
This commit is contained in:
parent
01ef97ffdf
commit
7f8c2ce33b
4 changed files with 21 additions and 2 deletions
|
@ -1333,3 +1333,10 @@ def test_vec_gm():
|
|||
cc = pe.Corr(obs)
|
||||
pe.gm(cc, S=4.12)
|
||||
assert np.all(np.vectorize(lambda x: x.S["qq"])(cc.content) == 4.12)
|
||||
|
||||
def test_complex_addition():
|
||||
o = pe.pseudo_Obs(34.12, 1e-4, "testens")
|
||||
r = o + 2j
|
||||
assert r.real == o
|
||||
r = r * 1j
|
||||
assert r.imag == o
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue