Skip to content

Commit 41fc42b

Browse files
bmaessmassich
authored andcommitted
Use allclose when checking projections in beamformer (#5825)
1 parent 68410a1 commit 41fc42b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mne/beamformer/_compute_beamformer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ def _check_proj_match(info, filters):
123123
"""Check whether SSP projections in data and spatial filter match."""
124124
proj_data, _, _ = make_projector(info['projs'],
125125
filters['ch_names'])
126-
if not np.array_equal(proj_data, filters['proj']):
126+
if not np.allclose(proj_data, filters['proj'],
127+
atol=np.finfo(float).eps, rtol=1e-13):
127128
raise ValueError('The SSP projections present in the data '
128129
'do not match the projections used when '
129130
'calculating the spatial filter.')

0 commit comments

Comments
 (0)