AFAICT, the 'types' and 'funcs' arguments to PyUFunc_FromFuncAndData are not copied. There is one example in numpy book showing them pointing to static storage, but the doc of PyUFunc_FromFuncAndData fails to point this out.