diff --git a/README.md b/README.md index db4e9d8..21caa40 100644 --- a/README.md +++ b/README.md @@ -3511,18 +3511,18 @@ if __name__ == '__main__': Appendix -------- ### Cython -**Library that compiles Python code into C.** +**Library that compiles Python-like code into C.** ```python # $ pip3 install cython -import pyximport; pyximport.install() -import -.main() +import pyximport; pyximport.install() # Module that runs imported Cython scripts. +import # Script needs a '.pyx' extension. +.main() # Main() isn't automatically executed. ``` #### Definitions: * **All `'cdef'` definitions are optional, but they contribute to the speed-up.** -* **Script needs to be saved with a `'pyx'` extension.** +* **Also supports C pointers via `'*'` and `'&'`, structs, unions, and enums.** ```python cdef [= ] diff --git a/index.html b/index.html index b22faa7..64862d9 100644 --- a/index.html +++ b/index.html @@ -55,7 +55,7 @@
- +
@@ -2856,17 +2856,17 @@ px.line(df, x='Date', y=#Appendix

Cython

Library that compiles Python code into C.

# $ pip3 install cython
-import pyximport; pyximport.install()
-import <cython_script>
-<cython_script>.main()
+

#Appendix

Cython

Library that compiles Python-like code into C.

# $ pip3 install cython
+import pyximport; pyximport.install()  # Module that runs imported Cython scripts.
+import <cython_script>                 # Script needs a '.pyx' extension.
+<cython_script>.main()                 # Main() isn't automatically executed.
 

Definitions:

  • All 'cdef' definitions are optional, but they contribute to the speed-up.
  • -
  • Script needs to be saved with a 'pyx' extension.
  • +
  • Also supports C pointers via '*' and '&', structs, unions, and enums.
cdef <ctype/type> <var_name> [= <obj>]
 cdef <ctype>[n_elements] <var_name> [= <coll_of_nums>]
 cdef <ctype/type/void> <func_name>(<ctype/type> <arg_name>): ...
@@ -2924,7 +2924,7 @@ $ deactivate                # Deactivates the active