def _check_comp(comp):
 ref_sens = None
 kind = (-1)
 for (k, c_k) in enumerate(comp):
  if (c_k['coeff_type'] != kind):
   c_ref = c_k
   ref_sens = c_ref['sensors']
   kind = c_k['coeff_type']
  elif (not (c_k['sensors'] == ref_sens)):
   raise RuntimeError('Cannot use an uneven compensation matrix')

def _check_comp ( comp ) : ref_sens = None kind = ( - 1 ) for ( k , c_k ) in enumerate ( comp ) : if ( c_k [ 'coeff_type' ] != kind ) : c_ref = c_k ref_sens = c_ref [ 'sensors' ] kind = c_k [ 'coeff_type' ] elif ( not ( c_k [ 'sensors' ] == ref_sens ) ) : raise RuntimeError ( 'Cannot use an uneven compensation matrix' )
check that conversion to named matrices is possible .