Temporarily enable the selection of the method and number of cores to use
from the high level routine.
New implementation that uses cython for setting up the arrays,
and raw C for the computation.