This simple example demonstrates how Cython turns Python-looking code into C. Just click the link to the html file located in the cell output. Then double click on line 12 to see the auto-generated C code. It looks long and complicated but a closer inspection shows that most of what's written are variables names. Buried within you can find something like
exp(pow(x,2))
Take a look at the other lines of code to see otehr examples of how Cython converts to C.
|
|