I have no experience with cython and just started learning it. I am trying to pass a module as an argument to a struct, but I don't know how? This is a sample code I tried in Jupyter-notebook:
%load_ext cython
%%cython
cdef class A:
pass
cdef struct person:
int num
object info
cdef person someone
p1.idd = 94113
p1.info = A()
I would appreciate to help me with that.
Actually I am trying to replace the python dict
lists in my code with self-designed structs because as I read here, it's not possible to use nogil with python dicts.
If anybody could find some way to overcome the problem in the way that code runs as fast as possible, that would be highly appreciated.
Thanks.