ktnrg45 / vs-code-cython

VS Code Language Extension for Cython
MIT License
43 stars 3 forks source link

Mistake on type declaration #2

Closed TsXor closed 1 year ago

TsXor commented 1 year ago
cdef cnp.ndarray[double, ndim=3] fimg

which is legal in cython, raises:

cdef cnp.ndarray[double, ndim=3] fimg
                              ^
Axis specification only allowed in the "step" slot for a view
TsXor commented 1 year ago

Another problem: declarations in pxd file. Solution: when checking the grammar of a pyx file, if there is a pxd file with the same name in the same folder, concat that pxd file before the pyx file.

TsXor commented 1 year ago

Type casting from pointer to typed memoryview:

<num_t[:h, :w]>

will raise:

<num_t[:h, :w]>
      ^
Expected cast close

<num_t[:h, :w]>
       ^
Expected expression
TsXor commented 1 year ago

declaration of a ctuple like

cdef (int, double) xy = (x, y)

is not supported

ktnrg45 commented 1 year ago

Thanks for reporting these issues.

pxd files should be 'imported' automatically and ctuple parsing has been added in version 0.1.0.

I will take a look at the other issues when I have time.

ktnrg45 commented 1 year ago

All of these issues should be resolved in 0.1.2