Just try! &d[0] works for me (i'm using cython-devel repo) On 5/20/08, Brian Blais <[EMAIL PROTECTED]> wrote: > Hello, > > I have a pointer to a double, like > > cdef double *d > > and I'd like to pass to a function a pointer to the data contained in > d, with some offset, like: > > val=myfun(&d[10]) > > can I do something like that in cython? the only other alternative I > could think of is to pass the offset as a parameter, like > > val=myfun(d,10) > > but that makes the function itself uglier, and less efficient. Am I > thinking about this wrong? > > thanks, > > > bb > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev >
-- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
