mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 03:53: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
|
@ -1075,7 +1075,7 @@ class Corr:
|
|||
newcontent.append(self.content[t] + y.content[t])
|
||||
return Corr(newcontent)
|
||||
|
||||
elif isinstance(y, (Obs, int, float, CObs)):
|
||||
elif isinstance(y, (Obs, int, float, CObs, complex)):
|
||||
newcontent = []
|
||||
for t in range(self.T):
|
||||
if _check_for_none(self, self.content[t]):
|
||||
|
@ -1103,7 +1103,7 @@ class Corr:
|
|||
newcontent.append(self.content[t] * y.content[t])
|
||||
return Corr(newcontent)
|
||||
|
||||
elif isinstance(y, (Obs, int, float, CObs)):
|
||||
elif isinstance(y, (Obs, int, float, CObs, complex)):
|
||||
newcontent = []
|
||||
for t in range(self.T):
|
||||
if _check_for_none(self, self.content[t]):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue