| 1 | initial version |
I think you shouldn't put the cython definition and the interact in the same cell, because the cython cell will call a C compiler and will be quite expensive to execute. It doesn't make sense to weigh down every execution of the interact by the C compiler call.
Anyway, you can avoid the %cython magic and calling the cython environment from python:
cython("""
def function(...):
...
""")
@interact
def wrappe(...):
....
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.