I'd like to use C++ typed maps instead of Python dicts, where the map's keys are integers and values are typed Cython memoryviews. A minimal (non)working example is: # distutils: language=c++ from libcpp.unordered_map cimport unordered_map as Map cdef Map[int, int[:,:]] P; where I get the compilation error test.pyx:5:8: Reference-counted type 'int[:, :]' cannot be used as a template argument Is there any way to specify objects of this type? I'd like to take full advantage of Cython's speed advantages, and that means using typed containers! Continue reading...