Cython class AttributeError

前端 未结 1 694
鱼传尺愫
鱼传尺愫 2021-01-21 06:54

I have started to experiment with Cython and ran into the following problem. Consider the following class representing a vertex in the 3D space:

#Vertex.pyx
cdef         


        
相关标签:
1条回答
  • 2021-01-21 07:10

    By default cdef attributes are only accessible from within Cython. If you make it a public attribute with cdef public in front of the attribute name then Cython will generate suitable properties to be able to access it from Python.

    0 讨论(0)
提交回复
热议问题