Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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

bfroehle opened this Issue · 3 comments

4 participants


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


Thanks for filing it, Brad!


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:


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


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.