从上面的hpaulj的帮助中:答案是该
_integrand方法需要声明为
cpdefnot
cdef
cpdef double _integrand(self, double x): """Cython: integrand inside the class""" cdef double f = log(x) / sqrt(x) return f

从上面的hpaulj的帮助中:答案是该
_integrand方法需要声明为
cpdefnot
cdef
cpdef double _integrand(self, double x): """Cython: integrand inside the class""" cdef double f = log(x) / sqrt(x) return f