vs-code-cython
vs-code-cython copied to clipboard
VS Code Language Extension for Cython
The following code is supported (and based on this [convo](https://github.com/cython/cython/issues/5245#issuecomment-2083523496), preferred. See also [PR 6177](https://github.com/cython/cython/pull/6177)) style of Cython for a pointer array: ```cython cdef (char *)[4] char_ptr_array ``` However, currently...
Types memoryview are not recognized as such. ``` cdef int[:] a = np.arange(5, dtype='int32') ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Expression of type "NDArray[Any]" cannot be assigned to declared type "int" "NDArray[Any]" is incompatible with...
Type vector[char*] is not identified. However the code can be compiled and execute. Here is an example. from libcpp.vector cimport vector from libcpp.string cimport string from libc.stdlib cimport malloc, free...
When you have multiple explicit typecasts in the same line, they are not recognized correctly. Example code: ``` cdef double uniform(): return rand() / RAND_MAX ``` Gives "Expected expression" error...
I have a function, which has an argument int& size. In the function, size is assigned by an integer. The argument is actually used, and changed outside the function. However,...
Hi, I have discovered somewhat annoying bug. I am using the latest extension. `cpdef class` and `cpdef enum` are not recognized as valid synatax, maybe some other variants. This also...
Consider the following definition of linked list node: ```cython ctypedef struct my_node: void* data struct my_node* prev struct my_node* next_ ``` I don't know if this is valid in cython,...
Added in "noexcept nogil" as an acceptable pattern to grammar check. Addressing issue #20. _This is untested!_ I could not get the extension to compile locally (using windows) so I...
With cython 3.0.0+ we can write a function that is compiled with two different conditions: ```cython cdef double square(double x) noexcept nogil: return x * x ``` In this particular...
Hello, I love this extension. Recently I found some maybe-unintended behaviors with keyword `extern` #### 1. false negative when declaring extern variables/functions with `cdef extern` ```cython # Error: Expected "from"...