Oooppss... sorry for not reading correctly! But... does that mean that there will be no speed imporvement for these functions (which are the ones I want to speed up the most in my code) Moreover I see (now) in the manual that the def fns might include some cdef declarations of np.ndarrays.... what is happening there? Should I better try to implement my stuff without numpy arrays if I am really looking for speed (I do not think that would be very wise in my case).
Thanks for your patience! ;0) Best JF Johan Grönqvist wrote: > Hi, > > You must use def, not cdef. It is not possible to use such a dtype > declaration with cdef. > > <http://trac.cython.org/cython_trac/ticket/177> > > / johan > > Jean-Francois Moulin skrev: >> I tried to use the cdef instead as cpdef as suggested and it still >> fails, >> Dag Sverre Seljebotn wrote: >>> You need to use "def", not "cpdef", when dealing with array arguments. >>> Sorry, this should have been mentioned in the docs... >>> >>> Dag Sverre Seljebotn >>> -----Original Message----- >>> From: Jean-Francois Moulin <[email protected]> >>> >>>>> cpdef tuple discri_sweep_2D(... >>>>> np.ndarray[DTYPE_t, ndim=1] tof_histo, >>>>> np.ndarray[DTYPE_t, ndim=3] slab >>>>> ): > > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
