I know nothing about cython, only python.
The function emd_c below (from the pot optimal transport package) has a header whose argument formats
emd_c