Merge modify using cython