Ask Your Question

Revision history [back]

Hi,

To import a function you need to use a syntax like

from the_module import my_function

in your case it will be

from sage.gsl.integration import numerical_integral

To find out where is what, there is a magic function in Sage

sage: import_statements(numerical_integral)
from sage.gsl.integration import numerical_integral

(Note that the code you wrote won't run faster with cython: the function call will be in Cython but what is inside numerical_integral won't be different from a python call).