Cython implementation of Clope algorythm