Move some Cython code back to Python

Closed Martin Reinecke requested to merge reduce_cython into master

This moves two Cython files back to Python ... I found implementations that are efficient enough to avoid the Cython detour.

Merge request reports