def correct_preds(mat, p, target=None, cutoff=0.5):
 if (not target):
  target = mat
 if isinstance(p, EigenMatrix):
  err_code = _eigenmat.correct_preds(mat.p_mat, p.p_mat, target.p_mat, ct.c_float(cutoff))
 else:
  raise ValueError, 'Value must be of type EigenMatrix.'
 if err_code:
  raise generate_exception(err_code)
 return target

def correct_preds ( mat , p , target = None , cutoff = 0.5 ) : if ( not target ) : target = mat if isinstance ( p , EigenMatrix ) : err_code = _eigenmat . correct_preds ( mat . p_mat , p . p_mat , target . p_mat , ct . c_float ( cutoff ) ) else : raise ValueError , 'Value must be of type EigenMatrix.' if err_code : raise generate_exception ( err_code ) return target
compute mat* + .