mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 11:33:42 +02:00
fix: Corr.__repr__ also works for complex correlators.
This commit is contained in:
parent
f68a5d044f
commit
f39a70c5a8
2 changed files with 3 additions and 0 deletions
|
@ -969,6 +969,8 @@ class Corr:
|
||||||
content_string += "Description: " + self.tag + "\n"
|
content_string += "Description: " + self.tag + "\n"
|
||||||
if self.N != 1:
|
if self.N != 1:
|
||||||
return content_string
|
return content_string
|
||||||
|
if isinstance(self[0], CObs):
|
||||||
|
return content_string
|
||||||
|
|
||||||
if print_range[1]:
|
if print_range[1]:
|
||||||
print_range[1] += 1
|
print_range[1] += 1
|
||||||
|
|
|
@ -539,3 +539,4 @@ def test_complex_Corr():
|
||||||
cobs = pe.CObs(o1, o1)
|
cobs = pe.CObs(o1, o1)
|
||||||
ccorr = pe.Corr([cobs, cobs, cobs])
|
ccorr = pe.Corr([cobs, cobs, cobs])
|
||||||
assert np.all([ccorr.imag[i] == ccorr.real[i] for i in range(ccorr.T)])
|
assert np.all([ccorr.imag[i] == ccorr.real[i] for i in range(ccorr.T)])
|
||||||
|
print(ccorr)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue