Pythonic division not allowed triggered in Cython 0.23 but not 0.22

21 views
Skip to first unread message

Gerrit Holl

unread,
Nov 26, 2015, 1:34:01 AM11/26/15
to cython-users
Hello,

(I deeply apologise for sending HTML.  I am new to Google Groups and I can't find how to disable it.  Googling something with the phrase "google groups" in it is hopeless!  I hope my message is readable.)

Today I ran into a problem building numpy under Cython 0.23.  It worked fine under Cython 0.22.  I reported it to numpy and added a workaround there, but I was told this was probably due to a Cython glitch.  The numpy issue at https://github.com/numpy/numpy/issues/6719

Building numpy from git fails when Cythonizing numpy/random/mtrand/mtrand.pyx, due to an error Pythonic division not allowed without gil, consider using cython.cdivision(True).

Some people commented this may be a Cython bug: https://github.com/numpy/numpy/pull/6720#issuecomment-159658757

I am not a Cython user myself, I was just trying to build numpy.  But if it is a bug, I thought you might like to know.  If not, I'll leave it between you and the numpy folks to fight about it ;-)

Bye.

Robert Bradshaw

unread,
Nov 26, 2015, 1:56:20 AM11/26/15
to cython...@googlegroups.com
Thanks.

I wasn't able to reproduce this with

cdef double bad_call(int j, double* pix, double Sum):
with nogil:
res = pix[j] / Sum
return res

so I'm not sure what the difference in this code is here...
Reply all
Reply to author
Forward
0 new messages