The following code defines a simple Cython function (using Ipython magic, for convenience).
%load_ext cython
%%cython
def f(float x, float y=2):
return x+y
Then, calling help(f)
gives this message:
Help on built-in function f in module _cython_magic_e37eeabbc63d5167217465ba978239fc:
f(...)
Note that the arguments of f
are not shown. Also, the tab-completion does not work either for the argument names in ipython (e.g. typing f(x
then tab
).
If I define this function without using Cython:
def g(x, y=2):
return x+y
Calling help(g)
gives this and the tab-completion works as expected:
Help on function g in module __main__:
g(x, y=2)
Is there a way to get this behavior with the Cython function? I tried with def
, cdef
, cpdef
, with and without ipython magic, with no success.