def safe_max_abs_diff(A, ia, B, ib):
 A = (A[ia] if np.sum(ia) else 0.0)
 B = (B[ib] if np.sum(ia) else 0.0)
 return np.max(np.abs((A - B)))

def safe_max_abs_diff ( A , ia , B , ib ) : A = ( A [ ia ] if np . sum ( ia ) else 0.0 ) B = ( B [ ib ] if np . sum ( ia ) else 0.0 ) return np . max ( np . abs ( ( A - B ) ) )
compute np .