def _verify_source_estimate_compat(a, b):
 compat = False
 if (len(a.vertices) == len(b.vertices)):
  if all((np.array_equal(av, vv) for (av, vv) in zip(a.vertices, b.vertices))):
   compat = True
 if (not compat):
  raise ValueError('Cannot combine SourceEstimates that do not have the same vertices. Consider using stc.expand().')
 if (a.subject != b.subject):
  raise ValueError(('source estimates do not have the same subject names, %r and %r' % (a.subject, b.subject)))

def _verify_source_estimate_compat ( a , b ) : compat = False if ( len ( a . vertices ) == len ( b . vertices ) ) : if all ( ( np . array_equal ( av , vv ) for ( av , vv ) in zip ( a . vertices , b . vertices ) ) ) : compat = True if ( not compat ) : raise ValueError ( 'Cannot combine SourceEstimates that do not have the same vertices. Consider using stc.expand().' ) if ( a . subject != b . subject ) : raise ValueError ( ( 'source estimates do not have the same subject names, %r and %r' % ( a . subject , b . subject ) ) )
make sure two sourceestimates are compatible for arith .