On Thu, Sep 24, 2009 at 18:05, Sturla Molden <stu...@molden.no> wrote: > Robert Kern skrev: >> collections.deque() is a linked list of 64-item chunks. >> > Thanks for that useful information. :-) But it would not help much for a > binary tree... > > Since we are on the NumPy list... One could image making linked lists > using NumPy arrays with dtype=object. They are storage efficient like > tuples, and mutable like lists. > > def cons(a,b): > return np.array((a,b),dtype=object) > > But I guess the best way is to implement a real linked extension type in > Cython.
Yup! -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion