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.

S.M.
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to