Python lists are still hash tables containing Python objects even if you declare them as cdef list foo. In particuar, it is not possible to have a memory-contiguous array of a particular C datatype that way. You shoud use C arrays or C++ std::vector if you need arrays of a fixed C datatype.