Skip to content

Tag: cython

Do I need to use `nogil` in Cython

I have some Cython code that I’d like to run as quickly as possible. Do I need to release the GIL in order to do this? Let’s suppose my code is similar to this: I get a whole load of error messages from the np.zeros_like line similar to: Do I need to find a way of calling np.zeros_like without the

PyCharm CE does not recognize .pyx files

PyCharm Community Edition (CE) does not recognize few Cython files as shown in the picture below (with PyCharm red mark under the file name). Could you please advise me on what can I do ? Answer The PyCharm Community Edition does not support Cython. You should get PyCharm Professional Edition to get that feat…

Cython class AttributeError

I have started to experiment with Cython and ran into the following problem. Consider the following class representing a vertex in the 3D space: Now I try to create an object from the Python console: which works fine. However, when I’m trying to access the class attributes, I’m getting an Attribut…