@ -55,7 +55,7 @@
< body >
< body >
< header >
< header >
< aside > December 9 , 2024< / aside >
< aside > December 10 , 2024< / aside >
< a href = "https://gto76.github.io" rel = "author" > Jure Šorn< / a >
< a href = "https://gto76.github.io" rel = "author" > Jure Šorn< / a >
< / header >
< / header >
@ -2856,17 +2856,17 @@ px.line(df, x=<span class="hljs-string">'Date'</span>, y=<span class="hljs-strin
< div > < h2 id = "appendix" > < a href = "#appendix" name = "appendix" > #< / a > Appendix< / h2 > < div > < h3 id = "cython" > Cython< / h3 > < p > < strong > Library that compiles Python code into C.< / strong > < / p > < pre > < code class = "python language-python hljs" > < span class = "hljs-comment" > # $ pip3 install cython< / span >
< span class = "hljs-keyword" > import< / span > pyximport; pyximport.install()
< span class = "hljs-keyword" > import< / span > < cython_script>
< cython_script> .main()
< div > < h2 id = "appendix" > < a href = "#appendix" name = "appendix" > #< / a > Appendix< / h2 > < div > < h3 id = "cython" > Cython< / h3 > < p > < strong > Library that compiles Python-like code into C.< / strong > < / p > < pre > < code class = "python language-python hljs" > < span class = "hljs-comment" > # $ pip3 install cython< / span >
< span class = "hljs-keyword" > import< / span > pyximport; pyximport.install() < span class = "hljs-comment" > # Module that runs imported Cython scripts.< / span >
< span class = "hljs-keyword" > import< / span > < cython_script> < span class = "hljs-comment" > # Script needs a '.pyx' extension.< / span >
< cython_script> .main() < span class = "hljs-comment" > # Main() isn't automatically executed.< / span >
< / code > < / pre > < / div > < / div >
< / code > < / pre > < / div > < / div >
< div > < h4 id = "definitions" > Definitions:< / h4 > < ul >
< div > < h4 id = "definitions" > Definitions:< / h4 > < ul >
< li > < strong > All < code class = "python hljs" > < span class = "hljs-string" > 'cdef'< / span > < / code > definitions are optional, but they contribute to the speed-up.< / strong > < / li >
< li > < strong > All < code class = "python hljs" > < span class = "hljs-string" > 'cdef'< / span > < / code > definitions are optional, but they contribute to the speed-up.< / strong > < / li >
< li > < strong > Script needs to be saved with a < code class = "python hljs" > < span class = "hljs-string" > 'pyx '< / span > < / code > extension .< / strong > < / li >
< li > < strong > Also supports C pointers via < code class = "python hljs" > < span class = "hljs-string" > '*'< / span > < / code > and < code class = "python hljs" > < span class = "hljs-string" > '& '< / span > < / code > , structs, unions, and enums .< / strong > < / li >
< / ul > < pre > < code class = "python language-python hljs" > < span class = "hljs-keyword" > cdef< / span > < ctype/type> < var_name> [= < obj> ]
< / ul > < pre > < code class = "python language-python hljs" > < span class = "hljs-keyword" > cdef< / span > < ctype/type> < var_name> [= < obj> ]
< span class = "hljs-keyword" > cdef< / span > < ctype> [n_elements] < var_name> [= < coll_of_nums> ]
< span class = "hljs-keyword" > cdef< / span > < ctype> [n_elements] < var_name> [= < coll_of_nums> ]
< span class = "hljs-keyword" > cdef< / span > < ctype/type/void> < func_name> (< ctype/type> < arg_name> ): ...
< span class = "hljs-keyword" > cdef< / span > < ctype/type/void> < func_name> (< ctype/type> < arg_name> ): ...
@ -2924,7 +2924,7 @@ $ deactivate <span class="hljs-comment"># Deactivates the active
< footer >
< footer >
< aside > December 9 , 2024< / aside >
< aside > December 10 , 2024< / aside >
< a href = "https://gto76.github.io" rel = "author" > Jure Šorn< / a >
< a href = "https://gto76.github.io" rel = "author" > Jure Šorn< / a >
< / footer >
< / footer >