def insort(a, b, kind='mergesort'):
    c = np.concatenate((a, b))
c.sort(kind=kind)
flag = np.ones(len(c), dtype=bool)
np.not_equal(c[1:], c[:-1], out=flag[1:])
return c[flag]
combine two arrays and sort