In my Group class, there must be an attribute particles which should be an array-like but resizable type that can only hold Particle-instances.
Both classes, Group and Particle are declared using cdef.
As Python-lists can carry any Python-object, I thought there might be a more performant way of declaring some kind of C-list that does only accept Particle-instances.
In C it would be something like List<Particle> particle = new List<Particle>(); i think.
Is there any equivalent for Cython or should I just stay with the Python-list ?
The question begs to be asked : why do you want this ?
Depending on these, the best solution goes from using a python array to numpy or a stl container.
( Note, for example, that looping over python list in cython could be quite efficient. )