pickle cython class
问题 I have to save and load a cython class instance. My cython class is this plus several methods: import numpy as np cimport numpy as np cimport cython cdef class Perceptron_avg_my: cdef int wlen,freePos cdef np.ndarray w,wtot,wac,wtotc #np.ndarray[np.int32_t] cdef np.ndarray wmean #np.ndarray[np.float32_t] cdef public dict fpos def __cinit__(self,np.int64_t wlen=4*10**7): self.fpos= dict() self.freePos=1 self.wlen=wlen self.w=np.zeros(wlen,np.int32) self.wtot=np.zeros(wlen,np.int32) self.wac=np