@@ -29,35 +29,35 @@ def __init__(
2929 ----------
3030 op : operator that acts on the GP, see Operator module.
3131 data : data dictionary or List or np.ndarray. \
32- If input is List Dictionary needs position 'x' and value 'y' entries and optionally some error 'dy '. \
33- If input is List or np.ndarray needs [**x**, **y**, **dy **] entries, where dy is optional.
32+ If input is List Dictionary, needs position 'x' and value 'y' entries and optionally some error 'cov_y '. \
33+ If input is List or np.ndarray, needs [**x**, **y**, **cov_y **] entries, where cov_y is optional.
3434 x : position of the data, List or np.ndarray or number.
3535 y : value of the data, List or np.ndarray or number, must have the same length as x.
36- dy : error of the data, List or np.ndarray or number or None.
36+ cov_y : covariance of the data, List or np.ndarray or number or None.
3737 """
3838 self .op = op
3939
4040 if isinstance (data , dict ):
4141 x , y = make_column_vector (data ['x' ]), make_column_vector (data ['y' ])
42- dy = np .array (data ['dy ' ] if 'dy ' in data else 0. )
42+ cov_y = np .array (data ['cov_y ' ] if 'cov_y ' in data else 0. )
4343
4444 if isinstance (data , list ) or isinstance (data , np .ndarray ):
4545 x , y = make_column_vector (data [0 ]), make_column_vector (data [1 ])
46- dy = np .array (data [2 ] if len (data ) > 2 else 0. )
46+ cov_y = np .array (data [2 ] if len (data ) > 2 else 0. )
4747
4848 len_y = y .shape [0 ]
4949 assert x .shape [0 ] == len_y , \
5050 f'Length of x/y must match, have { x .shape [0 ], len (y )} .'
5151
52- assert (dy .shape == (len_y , len_y ) or dy .shape == (len_y ,) or dy .shape == (len_y , 1 ) or
53- dy .shape == (1 , len_y ) or dy .shape == (1 ,) or dy .shape == ()), \
54- f'Error matrix must be a matrix of shape (len(y), len(y)), a vector with len(y) or a number, \
55- have { dy .shape } with y having length { len_y } .'
52+ assert (cov_y .shape == (len_y , len_y ) or cov_y .shape == (len_y ,) or cov_y .shape == (len_y , 1 ) or
53+ cov_y .shape == (1 , len_y ) or cov_y .shape == (1 ,) or cov_y .shape == ()), \
54+ f'Covariance must be a matrix of shape (len(y), len(y)), a vector with len(y) or a number, \
55+ have { cov_y .shape } with y having length { len_y } .'
5656
57- if not dy .shape == (len (y ), len (y )):
58- dy = dy * np .eye (len (y ))
57+ if not cov_y .shape == (len (y ), len (y )):
58+ cov_y = cov_y * np .eye (len (y ))
5959
60- self .x , self .y , self .dy = x , y , dy
60+ self .x , self .y , self .cov_y = x , y , cov_y
6161 self ._op = None
6262 self ._args : Tuple = tuple ()
6363 self ._x = None
0 commit comments