From 896eec8ddce8979c57ae54d6ec8e2a54009ceef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Thu, 5 Jun 2025 10:27:52 +0200 Subject: [PATCH] Cython --- README.md | 4 ++-- index.html | 8 ++++---- parse.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f40a7ca..84eaf52 100644 --- a/README.md +++ b/README.md @@ -3520,7 +3520,7 @@ import # Script must be saved with '.pyx' extens #### All `'cdef'` definitions are optional, but they contribute to the speed-up: ```python -cdef [*] [= ] +cdef [*] [= ] cdef [n_items] [= ] cdef * = < *> malloc(n_items * sizeof()) cdef ( [*]): ... @@ -3530,7 +3530,7 @@ cdef ( [*]): ... cdef class : cdef public [*] def __init__(self, [*]): - self. = [&] + self. = ``` ```python diff --git a/index.html b/index.html index d2d9abb..f5cf53e 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@
- +
@@ -2880,7 +2880,7 @@ px.line(df, x='Date', y=All 'cdef' definitions are optional, but they contribute to the speed-up:
cdef <ctype/type> [*]<var_name> [= <obj>]
+

All 'cdef' definitions are optional, but they contribute to the speed-up:

cdef <ctype/type> [*]<var_name> [= <object>]
 cdef <ctype>[n_items] <array_name> [= <coll_of_nums/structs>]
 cdef <ctype> *<array_name> = <<ctype> *> malloc(n_items * sizeof(<ctype>))
 cdef <ctype/type/void> <func_name>(<ctype/type> [*]<arg_name>): ...
@@ -2889,7 +2889,7 @@ px.line(df, x='Date', y=cdef class <class_name>:
     cdef public <ctype/type> [*]<attr_name>
     def __init__(self, <ctype/type> [*]<arg_name>):
-        self.<attr_name> = [&]<arg_name>
+        self.<attr_name> = <arg_name>
 
cdef struct <struct_name>:
     <ctype> [*]<field_name>
@@ -2939,7 +2939,7 @@ $ deactivate                # Deactivates the active
  
 
   
 
diff --git a/parse.js b/parse.js
index 57a4e42..6e5fb30 100755
--- a/parse.js
+++ b/parse.js
@@ -326,7 +326,7 @@ const GROUPBY =
   '6  11  13';
 
 const CYTHON_1 =
-  'cdef <ctype/type> [*]<var_name> [= <obj>]\n' +
+  'cdef <ctype/type> [*]<var_name> [= <object>]\n' +
   'cdef <ctype>[n_items] <array_name> [= <coll_of_nums/structs>]\n' +
   'cdef <ctype> *<array_name> = <<ctype> *> malloc(n_items * sizeof(<ctype>))\n' +
   'cdef <ctype/type/void> <func_name>(<ctype/type> [*]<arg_name>): ...\n';
@@ -335,7 +335,7 @@ const CYTHON_2 =
   'cdef class <class_name>:\n' +
   '    cdef public <ctype/type> [*]<attr_name>\n' +
   '    def __init__(self, <ctype/type> [*]<arg_name>):\n' +
-  '        self.<attr_name> = [&]<arg_name>\n';
+  '        self.<attr_name> = <arg_name>\n';
 
 const CYTHON_3 =
   'cdef struct <struct_name>:\n' +
@@ -942,7 +942,7 @@ function fixHighlights() {
   $(`code:contains(samples_f = (sin(i *)`).html(AUDIO_2);
   $(`code:contains(collections, dataclasses, enum, io, itertools)`).html(MARIO);
   $(`code:contains(>>> gb = df.groupby)`).html(GROUPBY);
-  $(`code:contains(cdef  [*] [= ])`).html(CYTHON_1);
+  $(`code:contains(cdef  [*] [= ])`).html(CYTHON_1);
   $(`code:contains(cdef class :)`).html(CYTHON_2);
   $(`code:contains(cdef struct :)`).html(CYTHON_3);
   $(`ul:contains(Ctrl+F / ⌘F is usually sufficient.)`).html(INDEX);