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

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

Comments

Projects
None yet
2 participants
@matt-chan

matt-chan commented Sep 29, 2018

Hi,
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?

Thanks!

@scoder

This comment has been minimized.

Show comment
Hide comment
@scoder

scoder Sep 29, 2018

Contributor

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

Contributor

scoder commented Sep 29, 2018

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

matt-chan added a commit to matt-chan/cython that referenced this issue Oct 2, 2018

@matt-chan matt-chan referenced a pull request that will close this issue Oct 2, 2018

Open

Fix Memviewslice docstrings #2642

@matt-chan

This comment has been minimized.

Show comment
Hide comment
@matt-chan

matt-chan Oct 2, 2018

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...

matt-chan commented Oct 2, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment