mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-16 12:33:41 +02:00
feat: When initializing 1d correlators it is now checked whether all obs
are defined on the same ensembles.
This commit is contained in:
parent
78ff4bb117
commit
c3ba07280b
3 changed files with 20 additions and 5 deletions
|
@ -4,7 +4,7 @@ import autograd.numpy as anp
|
|||
import matplotlib.pyplot as plt
|
||||
import scipy.linalg
|
||||
from .obs import Obs, reweight, correlate, CObs
|
||||
from .misc import dump_object
|
||||
from .misc import dump_object, _assert_equal_properties
|
||||
from .fits import least_squares
|
||||
from .linalg import eigh, inv, cholesky
|
||||
from .roots import find_root
|
||||
|
@ -42,10 +42,8 @@ class Corr:
|
|||
if not isinstance(data_input, list):
|
||||
raise TypeError('Corr__init__ expects a list of timeslices.')
|
||||
|
||||
# data_input can have multiple shapes. The simplest one is a list of Obs.
|
||||
# We check, if this is the case
|
||||
if all([(isinstance(item, Obs) or isinstance(item, CObs)) for item in data_input]):
|
||||
|
||||
_assert_equal_properties(data_input)
|
||||
self.content = [np.asarray([item]) for item in data_input]
|
||||
self.N = 1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue