Ticket #510 (new defect)

Opened 3 years ago

Last modified 10 months ago

Uncompileable C code when combining & with buffer []

Reported by: dagss Owned by: somebody
Priority: major Milestone: wishlist
Component: Code Generation Keywords:
Cc:

Description

cimport numpy as np
import numpy as np

def f(x):
    cdef int* p
    cdef np.ndarray[int, ndim=2] a = np.arange(100).reshape(10,10)
    p = &(a[0,0])
    print p[2]

produces uncompileable garbage. It should either be disallowed or turned into a pointer into the array buffer.

Change History

Changed 10 months ago by bfroehle

I think this can be closed, as it works fine for me, even in Cython 0.16.

Note: See TracTickets for help on using tickets.