Use cython to wrap cextent (But it becomes too slow)