Simplify arrfunc_from_pyfunc