Ask Your Question

Revision history [back]

This works for me:

%cython
from __main__ import test

def test3(int m):
    return test(m)

The function name test is making things more confusing in this case. Python has a module named test, so if you just use import test, the module masks the previously defined function.