Skip to content

Commit

Permalink
add assert debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
zatkins2 committed Aug 7, 2024
1 parent 2b0f904 commit 244ab74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mflike/mflike.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ def update_extremal_scales(exp, pol, bpw):
# get the indices of the valid experiments in all the experiments
# for this systematic
intersect_valid_exps, valid_exp_idxs_in_valid_exps, valid_exp_idxs_in_exps = np.intersect1d(valid_exps, exps, return_indices=True)
assert np.all(intersect_valid_exps == valid_exps)
assert np.all(valid_exp_idxs_in_valid_exps == np.arange(len(valid_exps)))
assert np.all(intersect_valid_exps == valid_exps), \
f'{intersect_valid_exps=} but {valid_exps=}'
assert np.all(valid_exp_idxs_in_valid_exps == np.arange(len(valid_exps))), \
f'{valid_exp_idxs_in_valid_exps=} but {valid_exps=}'

# get the transformation matrix
mat = np.zeros((len(exps), len(exps)))
Expand Down

0 comments on commit 244ab74

Please sign in to comment.