correlate now also tests if idl for ensembles are identical

This commit is contained in:
Fabian Joswig 2021-11-05 12:19:23 +00:00
parent 2fdc17ecd3
commit aabac9d430

View file

@ -1162,6 +1162,8 @@ def correlate(obs_a, obs_b):
for name in obs_a.names:
if obs_a.shape[name] != obs_b.shape[name]:
raise Exception('Shapes of ensemble', name, 'do not fit')
if obs_a.idl[name] != obs_b.idl[name]:
raise Exception('idl of ensemble', name, 'do not fit')
if obs_a.reweighted is True:
warnings.warn("The first observable is already reweighted.", RuntimeWarning)