def METHOD_NAME():
  i = flex.miller_index(((1,2,3), (1,2,3), (3,0,3), (3,0,3), (3,0,3), (1,1,2)))
  d = flex.int((1,1,0,1,0,1))
  from cctbx import crystal
  cs = crystal.symmetry(unit_cell=(10,10,10,90,90,90), space_group_symbol="P1")
  ms = miller.set(cs, i)
  ma = miller.array(ms, data=d)
  try: ma.merge_equivalents()
  except Sorry as e: assert "merge_equivalents_exact: incompatible flags" in str(e)
  else: raise Exception_expected
  merging = ma.merge_equivalents(incompatible_flags_replacement=0)
  me = merging.array()
  assert approx_equal(me.data(), (1,1,0))
  merging = ma.merge_equivalents(incompatible_flags_replacement=2)
  me = merging.array()
  assert approx_equal(me.data(), (1,1,2))