Dear developer of cython,

First of all I thank you for all your work. Thanks to Cython and the
documentation and tutorial that you displayed on internet, I have
successfully managed to create a cython code approximately 250 times
quicker than with python and even 1.4times quicker than C.

In fact I created two cython codes corresponding to two python codes of
the same algorithm (one with a single function and one with several
classes and function).

I hesitated several minutes before posting in this list or in the user
list but since this is not simple cython problem but a problem with the
new version of cython, i have finally chosen to post here. I hope I made
the right choice.

I downloaded the version 0.13 of cython yesterday (I was previously using
the version 0.12.1) and two problems appeared when I used cython.

The first one is that it seems that we can no more combine cpdef and
decorator :

    @cython.boundscheck(False)
    @cython.wraparound(False)
    cpdef run(self,adjacencyMatrix_,nodesPosition_,int dimension,nbLink_):
   ^
------------------------------------------------------------

/homelocal/max/Memoire/Sources/CAttractionRepulsionAlgorithm.pyx:48:4:
Decorators can only be followed by functions

I have the same problem with cdef and I have not the problem with def.

The second problem is that it seems that we can nore more used
@cython.wraparound(False).
I have this error

    @cython.wraparound(False)
   ^
------------------------------------------------------------

/homelocal/max/Memoire/Sources/CAttractionRepulsionAlgorithm.pyx:47:4:
'wraparound' not a valid cython attribute or is being used incorrectly

and this error for the same line :

    @cython.wraparound(False)
   ^
------------------------------------------------------------

/homelocal/max/Memoire/Sources/CAttractionRepulsionAlgorithm.pyx:47:4:
'wraparound' not a valid cython language construct

The use of this decorator with cpdef is important for me since it speed up
my cython code by nearly a factor 2.

Max.


_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to