[Pyrex] array/list of extension type

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Nov 19 11:29:57 CET 2007


Tomas Sirny wrote:
> i want to have an 'matrix' attribute of Network as list or array of
> Neurons. Problem is, that when I define Network with cdef, i must define
 > Network's attributes also with cdef and I don't know how to do it with matrix.

> cdef class Network:
>     cdef double Alfa, Beta, Gama

Add this line:

       cdef object matrix

--
Greg



More information about the Pyrex mailing list