Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update cython_extension.ipynb to include `--annotate` examples #2286

Closed
bfroehle opened this Issue · 3 comments

4 participants

@bfroehle

In #2225 we added the --annotate option to %%cython but failed to update the example notebook to show this feature. We should update the notebook to show off this feature, or perhaps add a new notebook which maybe walks through a basic example provided with cython (e.g., http://docs.cython.org/src/quickstart/cythonize.html#determining-where-to-add-types).

@fperez
Owner

Thanks for filing it, Brad!

@fperez
Owner

It would be nice if as part of this, we could figure out (and correct) the source of the extra vertical whitespace that I'm seeing (and @ellisonbg confirmed) in the annotated HTML:

image

I don't know why that's happening, but it seems like we're adding blank lines unnecessarily. Maybe it's just that something is doing '\n'.join(somelist) when it should instead read ''.join(somelist), not sure...

@bfroehle

Yes, I see it too. It's coming from the CSS that the notebook uses. The notebook viewer displays the annotated source without extra spacing.

If you want to play around with the CSS without installing Cython, I've posted a simple notebook which you can download and work with.

@minrk minrk modified the milestone: no action, wishlist
@ellisonbg ellisonbg closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.