I want to create a function, which creates a 2d array of cdef class
cdef PyObject* create():
cdef PyObject* cells[2][2]
cdef Cell cell
for i in range(2):
for j in range(2):
cell = Cell(i, j)# def class Cell: ...
cells[i][j] = <PyObject*>cell
return cells
Error during compilation:
Cannot assign type 'PyObject *[2][2]' to 'PyObject *'
What is the proper way to return the array?