Instead of passing the scaling functions, try to override them

... by deriving them from an embedded C++ class with dummy functions
that are overridden in Python but can be used back in C++.