Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cython embedsignature gives useless information for memoryviews in Sphinx #2634

matt-chan opened this issue Sep 29, 2018 · 2 comments


Copy link

The embedsignature option in Cython gives call signature information for Sphinx to document, but it is not useful when describing memoryviews.

This is the source:

def foo(double[::1] n):

And this is the call signature printed in Sphinx

foo(__Pyx_memviewslice n)

So it loses the type information, along with the dimension and stride. Is it possible to add this in? Or is this something that should be addressed from the Sphinx-autodoc side?


Copy link

scoder commented Sep 29, 2018

Definitely a bug, thanks for the report. The code for this is in the EmbedSignature tree transformation in, probably easy to fix. Want to give it a try?

matt-chan pushed a commit to matt-chan/cython that referenced this issue Oct 2, 2018
Copy link
Contributor Author

I think this fixes it. No idea if it breaks something else though. I just stepped through it with a debugger and found where the string gets generated...

@scoder scoder added this to the 0.29.1 milestone Oct 14, 2018
bweigel pushed a commit to bweigel/cython that referenced this issue Oct 27, 2018
bweigel added a commit to bweigel/cython that referenced this issue Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants