Lowlevel callback functions¶
Some functions in SciPy take as arguments callback functions, which can either be python callables or lowlevel compiled functions. Using compiled callback functions can improve performance somewhat by avoiding wrapping data in Python objects.
Such lowlevel functions in SciPy are wrapped in LowLevelCallable
objects, which can be constructed from function pointers obtained from
ctypes, cffi, Cython, or contained in Python PyCapsule objects.

Lowlevel callback function. 
See also
Functions accepting lowlevel callables:
scipy.integrate.quad
, scipy.ndimage.generic_filter
, scipy.ndimage.generic_filter1d
,
scipy.ndimage.geometric_transform
Usage examples:
Extending scipy.ndimage in C, Faster integration using lowlevel callback functions