On Thu, Aug 14, 2008 at 11:51, Christopher Barker <[EMAIL PROTECTED]> wrote: > > One other potential downside of using python lists to accumulate numbers > is that you are storing python objects (python ints or floats, or...) > rather than raw numbers, which has got to incur some memory overhead. > > How does array.array perform in this context?
Pretty well for 1D arrays, at least. > It has an append() method, > and one would hope it uses a similar memory allocation scheme. It does. > Also, does numpy convert array.array objects to numpy arrays more > efficiently? It could, of course, but someone would have to have written > the special case code. It does. array.array() exposes the Python buffer interface. -- 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://projects.scipy.org/mailman/listinfo/numpy-discussion