def assert_any_equal(output, alternatives):
 one_equal = False
 for expected in alternatives:
  if np.all((output == expected)):
   one_equal = True
   break
 assert_(one_equal)

def assert_any_equal ( output , alternatives ) : one_equal = False for expected in alternatives : if np . all ( ( output == expected ) ) : one_equal = True break assert_ ( one_equal )
assert output is equal to at least one element in alternatives .